Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading string a line at time
Message
From
19/07/2001 19:28:52
Jason Dalio
Northern Interior Regional Health Board
Prince George, British Columbia, Canada
 
 
To
19/07/2001 17:32:04
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00532794
Message ID:
00532913
Views:
12
Logically, it looks liek your code checks out so the only things that come to mind are:

1) I am assuming (and hoping) that you have your ncurpos defined as a module level variable. If it doesn't then it won't retain your value as you call the function repeatedly.
2) Your code would break down if your cP string only contained one Chr$(13). For example if your cP was equal to:

abcdeXYfghijk

where X=chr$(13) and Y=chr$(10), then the first time it would read strTemp as abce but the second time it would return nothing since it can't find another instance of Chr$(13). Try this if you want to make sure of your input file.

Instead of reading from the file and writing it to sData, instead write it to an output file. Then you can use a 32-bit text editor to check the file to make sure that your chr$913)s and chr$(10)s are actually there and in the right place.
Previous
Reply
Map
View

Click here to load this message in the networking platform