M
monitor-radiation
I'm trying to get my program to write a blank line if the array segment
starts with a 0 or a 1. I have the if statment written down fine (i
believe), however the program skips the whole statement every time
through (found that out by stepping through the build). anyone know
what I'm doing wrong?
For s = 0 To UBound(Data) - 1
If Data(s).EndsWith(")") Then
l = Data(s).Length()
Data(s).Remove(0, l)
ElseIf Data(s).StartsWith("0") Then
fsStream.WriteLine()
fsStream.WriteLine(Data(s) + ", ")
ElseIf Data(s).StartsWith("1") Then
fsStream.WriteLine()
fsStream.WriteLine(Data(s) + ", ")
Else
fsStream.Write(Data(s) + ", ")
End If
Next
The If statement must work, because the first part (If
Data(s).EndsWith(")") Then) works just fine
starts with a 0 or a 1. I have the if statment written down fine (i
believe), however the program skips the whole statement every time
through (found that out by stepping through the build). anyone know
what I'm doing wrong?
For s = 0 To UBound(Data) - 1
If Data(s).EndsWith(")") Then
l = Data(s).Length()
Data(s).Remove(0, l)
ElseIf Data(s).StartsWith("0") Then
fsStream.WriteLine()
fsStream.WriteLine(Data(s) + ", ")
ElseIf Data(s).StartsWith("1") Then
fsStream.WriteLine()
fsStream.WriteLine(Data(s) + ", ")
Else
fsStream.Write(Data(s) + ", ")
End If
Next
The If statement must work, because the first part (If
Data(s).EndsWith(")") Then) works just fine