03-04-2007 01:17 PM
03-04-2007 01:55 PM - edited 03-04-2007 01:55 PM
You are doing this way too complicated. There is no loop needed.
Just extract the 1D array of account numbers, use "search 1D array" to find the row index of the desired account and subtract from the element in column 1 of that same row.
Here is one possibility.
Message Edited by altenbach on 03-04-2007 11:57 AM
03-04-2007 02:04 PM - edited 03-04-2007 02:04 PM
In general, you cannot simply replace a single row in an existing text file, because the number of bytes per number (and per row) is variable and thus the file size must change and all higher bytes need to be moved up or down accordingly.
Simply write the entire edited array back to the file, overwriting the original.
(If you would use a binary file format, it would be possible to overwite a certain postions in the file without problems. Another possibility would be to use a text file with fixed field lenghts)
Message Edited by altenbach on 03-04-2007 12:05 PM
03-05-2007 12:45 PM