KevinFord2003
Technical User
Hi all, got a strange problem with Instr$...
In the code below, the first line with Instr
works as expected. However, the next nested
instr test always fails, even when the search term is present. This is driving me nuts...Anyone know of a solution??
Thanks in advance!!
Here's the code:
DO
LINE INPUT #1, InLine$
InLine$ = LTRIM$(LCASE$(InLine$))
IF INSTR("begin polygon", InLine$) THEN
DO
LINE INPUT #1, InLine$
InLine$ = LTRIM$(LCASE$(InLine$))
' Next line ALWAYS fails
IF INSTR("vertex", InLine$) THEN
' Deal with it
END IF
LOOP WHILE done = 0
END IF
LOOP WHILE NOT EOF(1)
In the code below, the first line with Instr
works as expected. However, the next nested
instr test always fails, even when the search term is present. This is driving me nuts...Anyone know of a solution??
Thanks in advance!!
Here's the code:
DO
LINE INPUT #1, InLine$
InLine$ = LTRIM$(LCASE$(InLine$))
IF INSTR("begin polygon", InLine$) THEN
DO
LINE INPUT #1, InLine$
InLine$ = LTRIM$(LCASE$(InLine$))
' Next line ALWAYS fails
IF INSTR("vertex", InLine$) THEN
' Deal with it
END IF
LOOP WHILE done = 0
END IF
LOOP WHILE NOT EOF(1)