Page 1 of 1

Reading From File

Posted: Thu Oct 16, 2008 8:56 pm
by warrenk
I am reading data from a file which uses '*' as a separator between fields. When I put 'it' into my field, it includes my separator. How would I prevent the separator from being added.

Data:
12345*6789*

read from file "settings.dat" until "*"
put it into field "Total1"

value of Total1 is 12345*. I require the value to be 12345.

Thanks!
Warren

Posted: Thu Oct 16, 2008 9:18 pm
by Janschenkel
Simply add the following after your 'read' command.

Code: Select all

delete char -1 of it
HTH,

Jan Schenkel.