AnsweredAssumed Answered

vrf-avioding string trim when reading a text file

Question asked by VRFuser on Mar 29, 2001

I am trying to read a text file into 1D-array without losing any leading or
trailing space or tab characters.

1.I first used the I/O object From file (Read,Text,String format, Array 1D,
To end), it's very quick and doesn't use much memory, but it trims every row
in the text file.

2. I changed the settings of the From file object to (Read,Text,Char
format,Num of chars 1,to end) and then attached a to string object to
convert the 1D-array of chars to a 1D-array of strings (each row is a
string). With this solution I keep the leading and trailing space and tab
characters but it is extremely memory consuming. If I read a 690KB text file
VEE uses about 30MB. With solution 1 VEE uses about 1MB.

Question 1. How can I read a text file into 1D-array of strings without
losing leading and trailing space and tab characters and not using to much

Question 2. What is the reason to the large memory usage in solution 2?

Thanks in advance!

Best Regards

Stefan Westh

Metrology/ Development
Celsius Metech AB
Box 1015
SE-732 26 ARBOGA
Tel +46 589 82640
Fax +46 589 10740

This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "".  Subscriptions and
unsubscriptions are done through the address "".
If you need details, just send a message containing the text "help"
to "".