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

Username:   Password: 
 RegisterRegister   
 How to get an Array from Text file.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Dinosaurus




PostPosted: Thu Jan 14, 2010 9:32 pm   Post subject: How to get an Array from Text file.

I'm trying to get 10 numbers from a text file to become an 1..10 array for the program. I have no idea what to do. Please help.
Sponsor
Sponsor
Sponsor
sponsor
Zren




PostPosted: Thu Jan 14, 2010 9:43 pm   Post subject: RE:How to get an Array from Text file.

Check out this example with get in the Turing Documentation: http://compsci.ca/holtsoft/doc/get.html

Turing:

        var line : string
        loop
            exit when eof   % Are there more characters?
            get line : *    % Read entire line
            put line
        end loop


and open http://compsci.ca/holtsoft/doc/open.html

and remember your reading strings from files and have to convert them if your array is of integers.
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  [ 2 Posts ]
Jump to:   


Style:  
Search: