|
-
October 3rd, 2001, 05:18 AM
#1
Text processing & File I/O
I'm trying to read in data from a text file (data is in column format) and store it in arrays. Is there any simple method to do it, or must I read in line by line and process each line character by character?
-
October 3rd, 2001, 03:32 PM
#2
Re: Text processing & File I/O
you can read each line and then separate easily by the Split() command.
dim strData() as String
dim nData() as Integer
dim Line as String
dim i as Integer
...
read line string here into Line
...
strData=Split(Line," ")
ReDim nData(0 to UBound(strData))
for i=0 to UBound(strData)
nData(i)=strData(i)
next i
This code might need some small fixes because i didn't check it...
----------
The @host is everywhere!
----------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|