Hi,
I have to read and write to a specific file format for a particular project but have been unable to find a simple solution.
I want to read data from a flat text file in the format of 70 digits wide and as many rows as needed to make up the current length of the number. For example if the number is currently 100 digits long then the text file will contain two rows the first 70 digits long and the second 30. If the current number length is 200 digits then the text file will contain 2 x rows of 70 digits and 1 row of 60 digits.
The main problem I have is that there is no delimiter between each digit so one row subset would look like this 53251682579520706284777. I need to be able to read each digit separately and add it as an element to a 1d array and then write it back from the 1d array to the same format.
Is there way of formatting read and write statements to do this?
Cheers,
Matt Stenson
************************************************************************
The information in this e-mail together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.
Any form of review, disclosure, modification, distribution
and/or publication of this e-mail message is prohibited.
If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.
************************************************************************
|