RosettaCodeData/Task/Input-loop/BaCon/input-loop.bacon
2023-07-01 13:44:08 -04:00

13 lines
334 B
Text

'--- some generic header file to give it a real test
PRINT "Enter any file name you want to read ex: /usr/include/X11/X.h"
INPUT filename$
text$ = LOAD$(filename$)
SPLIT text$ BY NL$ TO TOK$ SIZE dim
i = 0
'---dynamic index the end of an array is always null terminated
WHILE (TOK$[i] ISNOT NULL)
PRINT TOK$[i]
INCR i
WEND