Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 File I/O help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ShadowStorm




PostPosted: Thu May 01, 2003 1:20 pm   Post subject: File I/O help

i have a file with about five lines in it

when i try to input the file i only get the first line.. i need help Sad

this is what i have :

code:

open : Mission1Briefing, "Mission1.txt", get
get : Mission1Briefing, Briefing :*
close : Mission1Briefing

put Briefing
[/code]
Sponsor
Sponsor
Sponsor
sponsor
Catalyst




PostPosted: Thu May 01, 2003 1:36 pm   Post subject: (No subject)

code:
open : Mission1Briefing, "Mission1.txt", get
get : Mission1Briefing, Briefing :*
close : Mission1Briefing

put Briefing


is only retrieving the first line beacuse it is only being called once

code:
open : Mission1Briefing, "Mission1.txt", get

loop
exit when eof(Mission1Briefing)
get : Mission1Briefing, Briefing :*
end loop

close : Mission1Briefing

put Briefing


for this to work youll need an array of briefing variables, with each one storing one line
ShadowStorm




PostPosted: Fri May 02, 2003 12:18 pm   Post subject: (No subject)

thanx alot...
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: