Snape
01-26-2009, 04:40 PM
Hi Guys,
I am having a bit of a problem trying to determine how many lines are in a text file (textInstructionFile - already defined).
I am trying to use this code but if errors after it prints '2' when it gets to the second line.
textInFile = openFile textInstructionFile
s=stringstream (readLine textInFile)
totalNumberOfFrames = 1
while not eof s do
(
totalNumberOfFrames = totalNumberOfFrames + 1
print totalNumberOfFrames
skipToNextLine s
)
Can anyone see where I am going wrong?
Thanks for any help.
Spencer
I am having a bit of a problem trying to determine how many lines are in a text file (textInstructionFile - already defined).
I am trying to use this code but if errors after it prints '2' when it gets to the second line.
textInFile = openFile textInstructionFile
s=stringstream (readLine textInFile)
totalNumberOfFrames = 1
while not eof s do
(
totalNumberOfFrames = totalNumberOfFrames + 1
print totalNumberOfFrames
skipToNextLine s
)
Can anyone see where I am going wrong?
Thanks for any help.
Spencer
