Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
23
Task/Array-concatenation/GW-BASIC/array-concatenation.basic
Normal file
23
Task/Array-concatenation/GW-BASIC/array-concatenation.basic
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
100 U1 = 3: U2 = 4
|
||||
110 DIM A$(3)
|
||||
120 DATA "The","quick","brown","fox"
|
||||
130 FOR I = 0 TO U1 : READ A$(I) : NEXT I
|
||||
140 DIM B$(4)
|
||||
150 DATA "jumped","over","the","lazy","dog"
|
||||
160 FOR I = 0 TO U2 : READ B$(I) : NEXT I
|
||||
170 'SU2 ConcatArrays
|
||||
180 X = U1 + 1
|
||||
190 Y = U2 + 1
|
||||
200 Z = X + Y
|
||||
210 DIM C$(Z-1)
|
||||
220 FOR I = 0 TO X-1
|
||||
230 C$(I) = A$(I)
|
||||
240 NEXT I
|
||||
250 FOR I = 0 TO Y-1
|
||||
260 C$(U1+I+1) = B$(I)
|
||||
270 NEXT I
|
||||
280 '
|
||||
290 FOR I = 0 TO Z-1
|
||||
300 PRINT C$(I); " ";
|
||||
310 NEXT I
|
||||
320 END
|
||||
Loading…
Add table
Add a link
Reference in a new issue