Hi,
I want to know the codes for CR and LF or CRLF. I am writing a subroutine in which a string is truncated after a pair of numbers separated by a CRLF (which takes 2 places in the string).
The datastring = "1,0" & CRLF & "2,0" & CRLF & "3,0" & CRLF & "4,0" & CRLF & "5,1" & CRLF & "6,0" & CRLF & "7,1" & CRLF & "8,0" & CRLF & "9,1" & CRLF & "10,1" & CRLF
But after reading the pair "5,1" the subroutine doesn't recognize the CRLF anymore. This is due to the 1 after the 5 (I changed this to try out).
the subroutine is
s = 0 '// set STOPsign
k = 0
dd = 0
DO WHILE (k < StrLength(D$)-1) AND (s=0)
T$ = StrAt(D$,k)
IF T$ = cCRLF then
dd = k
s = 1
END IF
k=k+1 'remember there is always an increment after the stopsign
LOOP
Any ideas?
thnx
Marc
I want to know the codes for CR and LF or CRLF. I am writing a subroutine in which a string is truncated after a pair of numbers separated by a CRLF (which takes 2 places in the string).
The datastring = "1,0" & CRLF & "2,0" & CRLF & "3,0" & CRLF & "4,0" & CRLF & "5,1" & CRLF & "6,0" & CRLF & "7,1" & CRLF & "8,0" & CRLF & "9,1" & CRLF & "10,1" & CRLF
But after reading the pair "5,1" the subroutine doesn't recognize the CRLF anymore. This is due to the 1 after the 5 (I changed this to try out).
the subroutine is
s = 0 '// set STOPsign
k = 0
dd = 0
DO WHILE (k < StrLength(D$)-1) AND (s=0)
T$ = StrAt(D$,k)
IF T$ = cCRLF then
dd = k
s = 1
END IF
k=k+1 'remember there is always an increment after the stopsign
LOOP
Any ideas?
thnx
Marc