-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathL16-3.BAS
26 lines (26 loc) · 1.02 KB
/
L16-3.BAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
100 REM Program to draw concentric boxes in text mode.
110 SCREEN 0,1:COLOR 7,0,0:WIDTH 40:LOCATE ,,0:KEY OFF:CLS
120 REM Draw edges of outer box
130 FOR I=5 TO 35:LOCATE 5,I:PRINT CHR$(196):NEXT I
140 FOR I=5 TO 35:LOCATE 20,I:PRINT CHR$(196):NEXT I
150 FOR I=6 TO 19:LOCATE I,4:PRINT CHR$(179):NEXT I
160 FOR I=6 TO 19:LOCATE I,36:PRINT CHR$(179):NEXT I
170 REM Draw corners of outer box
180 LOCATE 5,4:PRINT CHR$(218)
190 LOCATE 5,36:PRINT CHR$(191)
200 LOCATE 20,36:PRINT CHR$(217)
210 LOCATE 20,4:PRINT CHR$(192)
220 REM Draw edges of inner box
230 FOR I=6 TO 34:LOCATE 6,I:PRINT CHR$(196):NEXT I
240 FOR I=6 TO 34:LOCATE 19,I:PRINT CHR$(196):NEXT I
250 FOR I=7 TO 18:LOCATE I,5:PRINT CHR$(179):NEXT I
260 FOR I=7 TO 18:LOCATE I,35:PRINT CHR$(179):NEXT I
270 REM Draw corners of inner box
280 LOCATE 6,5:PRINT CHR$(218)
290 LOCATE 6,35:PRINT CHR$(191)
300 LOCATE 19,35:PRINT CHR$(217)
310 LOCATE 19,5:PRINT CHR$(192)
320 LOCATE 24,9:PRINT "PRESS ANY KEY TO CONTINUE";
330 A$=INKEY$:IF A$="" THEN 330 ELSE CLS
340 END