nabla101
Junior Member level 3

Hi, could anyone help me using the READLINE and READ procedures of the std.textio package?
Say if I had a text file with numerical values seperated by whitespace, how could I intitialise an array with these values for simulation (Read them from the file one by one and into the array)?
i.e. how can I use the READLINE and READ procedures to parse the file line-by-line, or value-by-value?
the structure of the text file will be something like:
1 78 255 0 145 34
92 3 194 65 245 0
etc..
With a fixed number of values per line seperated by spaces.
Thanks
Say if I had a text file with numerical values seperated by whitespace, how could I intitialise an array with these values for simulation (Read them from the file one by one and into the array)?
i.e. how can I use the READLINE and READ procedures to parse the file line-by-line, or value-by-value?
the structure of the text file will be something like:
1 78 255 0 145 34
92 3 194 65 245 0
etc..
With a fixed number of values per line seperated by spaces.
Thanks