![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
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 |
|
|||
|
Hi Erel, No I am not using it elsewhere and I always uncheck the unassigned variables because it is a bit annoying when translating from other code.
But I got it working using CHR(13) and not the CRLF constant.... thnx Marc |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Codes Unable to run no VISTA | tcgoh | Questions & Help Needed | 4 | 08-19-2008 04:17 PM |
| return codes of a shell command | pmu5757 | Questions & Help Needed | 18 | 06-15-2008 08:33 PM |