|
-
Apr 25th, 2000, 01:14 AM
#1
Thread Starter
Lively Member
Please tell me there's a way to do this other than using a
bunch of If statements. What I'm looking for is a way to do
what "continue" does in C.
I have a text file I've read into an array of strings, each
element of teh array is a line in the file. for some lines,
I only need to do minimal things, some are even discarded.
Here's what I wanted to do
Function Parse_Lines(FileArray() As String, OptionArray() As tOption) As Boolean
Dim x As Integer, y As Integer, EndTagPos As Integer
Dim OneChar As String, KeyWord As String, FileComments As String
FileComments = ""
KeyWord = ""
For x = 1 To UBound(FileArray)
If (Mid$(FileArray(x), 1, 1) = "") Or _
Just_Spaces(FileArray(x), 1) Then
<do a "Next x" or something like that to
skip the rest>
End If
If Mid$(FileArray(x), 1, 1) = "#" Then
FileComments = FileComments & Mid$(FileArray(x), _
2, Len(FileArray(x)) & vbNewLine)
<something like a Next X>
End If
... a whole lot more string parsing...
I know you can use a whole bunch of nested If's but
that's just so damn ugly. Is there any way to start
the next iteration of the for loop without traversing the
whole loop?
-Rich
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
|