
-----------------------------------
MysticVegeta
Sun Feb 13, 2005 8:00 pm

really weird thing with file io
-----------------------------------
really weird thing happens
when i go something like this ->

%Declaring the variables
var input : array 1 .. 5 of string
var lines : array 1 .. 5 of string
var stream : int

%Creating File
open : stream, "txtfile.txt", put
put : stream, "11"
close (stream)

%Get part
for x : 1 .. 5
    get input (x)
end for

%The main loops
open : stream, "txtfile.txt", get
for x : 1 .. 5
    get : stream, lines (x) : *
end for
close (stream)

put "exit"


But in the "main loop", when i add

exit when eof

It actually "gets" the stream int, like asks for 6 inputs!! How do i make it so that it exits after eof

-----------------------------------
1337_brad
Sun Feb 13, 2005 8:06 pm

well..
-----------------------------------
If you put everything as you did, it should be 


exit when eof(stream)

