Computer Science Canada

How to get an Array from Text file.

Author:  Dinosaurus [ 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.

Author:  Zren [ 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.


: