hi
i have a line of data with fields of various lengths that i need to extract. each field varies in length and are separated by spaces (could be one or more spaces):
eg: XXXXXXXX XXXXXX XXXXXXXXX XXXXXXXXX XX
i'm looking for a code that will give me something like
field1 = " ", field2 = " "...etc. i need to place these fields on another screen.
i tried to test each character until i reach a space. this is what i have so far
i can get the first field but am stuck getting the rest of the fields.
any thoughts? i'm not good with arrays.
thanks
zach
i have a line of data with fields of various lengths that i need to extract. each field varies in length and are separated by spaces (could be one or more spaces):
eg: XXXXXXXX XXXXXX XXXXXXXXX XXXXXXXXX XX
i'm looking for a code that will give me something like
field1 = " ", field2 = " "...etc. i need to place these fields on another screen.
i tried to test each character until i reach a space. this is what i have so far
Code:
linedat = sess.getstring (16, 11, 69)
for i = len(linedat)
field = mid(linedat,i,1)
if field = " " then field1 = sess.getstring (16,11, i -1)
next i
any thoughts? i'm not good with arrays.
thanks
zach