DMS500Tech
Technical User
Same Scipt, 3 senerios, The first 2 work perfect everytime but the 3rd (searching for a "1")will not work. The first searches for "/" 2nd for "2" and they loop like they are suppose to. The third searches for a "1" and finds the first occurance then stops. I don't get it!
PROC MAIN
string FileName
integer position
FileName = "1/2/1/2/1/26/17"
position = 1
while (Position !=0)
strfind FileName "/" Position
if failure
Position = 0
else
strdelete FileName Position 1
endif
endwhile
usermsg FileName
endproc
PROC MAIN
string FileName
integer position
FileName = "1/2/1/2/1/26/17"
position = 1
while (Position !=0)
strfind FileName "2" Position
if failure
Position = 0
else
strdelete FileName Position 1
endif
endwhile
usermsg FileName
endproc
PROC MAIN
string FileName
integer position
FileName = "1/2/1/2/1/26/17"
position = 1
while (Position !=0)
strfind FileName "1" Position
if failure
Position = 0
else
strdelete FileName Position 1
endif
endwhile
usermsg FileName
endproc
PROC MAIN
string FileName
integer position
FileName = "1/2/1/2/1/26/17"
position = 1
while (Position !=0)
strfind FileName "/" Position
if failure
Position = 0
else
strdelete FileName Position 1
endif
endwhile
usermsg FileName
endproc
PROC MAIN
string FileName
integer position
FileName = "1/2/1/2/1/26/17"
position = 1
while (Position !=0)
strfind FileName "2" Position
if failure
Position = 0
else
strdelete FileName Position 1
endif
endwhile
usermsg FileName
endproc
PROC MAIN
string FileName
integer position
FileName = "1/2/1/2/1/26/17"
position = 1
while (Position !=0)
strfind FileName "1" Position
if failure
Position = 0
else
strdelete FileName Position 1
endif
endwhile
usermsg FileName
endproc