Create a new text file with this in it:
Now use the following code:a
b
Code: Select all
DIM buffer AS STRING
' Find the first free file handle.
f = FREEFILE
OPEN "Source.txt" FOR Input AS #f
do until Eof(f) = -1
'Fetch our string from the file.
Line Input #f, buffer
'Print our string and the first letter of the string
Print buffer
Print buffer[0] 'Will crash on second line after "a".
sleep 'Hit enter to move onto the next line
loop
' Close all open files.
CLOSE
sleep
END