RosettaCodeData/Task/Input-loop/BaCon/input-loop.bacon

14 lines
334 B
Plaintext

'--- 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