home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib40b.dsk
/
GOTO.GOSUB.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
641b
|
28 lines
10 REM ***********************
20 REM * GOTO -- GOSUB DEMO *
30 REM * BY FRANK H. SWEET *
40 REM * COPYRIGHT (C) 1990 *
50 REM * MINDCRAFT PUBL.CORP.*
60 REM * CONCORD, MA 01742 *
70 REM ***********************
130 :
140 REM A short program to illustrate the
150 REM possibilities of using GOTO
160 REM and GOSUB to debug a BASIC program
170 :
180 HOME
190 INPUT "Enter a name ";N$
200 INPUT "Enter number of times to print it ";N
210 GOSUB 290
220 X = 12
230 :
240 FOR K = 1 TO 12
250 PRINT K,K *X
260 NEXT
270 END
280 :
290 REM SUBROUTINE
300 FOR K = 1 TO N
310 PRINT N$
320 NEXT K
330 RETURN