>>My code stores a singe character to ff
>>
>>How do I test ff for FF, LF and CR characters
>>
>>Simple I know
>>
>>One of those days
>>
>>Colin
>
>in general $ or AT()
>
>lcString =`'ABCD'
>?'A'$lcString
>?'a'$lcString
>?at('A',lcString)
>?at('a',lcString)
>
>for CR,LF etc you can use CHR() or the 0h Syntax
>
>lcCHR = CHR(13)
>lcCHR2=0h0D
>?lcCHR=lcCHR2
>
>
>For the codes see
http://en.wikipedia.org/wiki/ASCIII am importing a text file - when I hit CR or LF I want to indent the next line - so I inject paces between the character found and the balance of the text so that all lines start indented as this is the text of a letter that will be printed
But it is not quite right -
Any chance you could have a quick look - you have been very helpful over the last few days
CLEAR all
clear
set printer off
PUBLIC fred,chn
fred=FILETOSTR("c:\arranmar1.txt")
fred=ALLTRIM(fred)
STORE LEN(fred) TO lf
* Now I have the length of the text file
FOR x=1 TO lf
STORE SUBSTR(fred,x,1) TO chn
STORE SUBSTR(fred,lf-x) TO rigt
IF chn=CHR(12) OR chn=CHR(15)
STORE LEFT(fred,x)+" "+rigt TO fred
endif
next
? fred
cancel
Specialist in Advertising, Marketing, especially Direct Marketing
I run courses in Business Management and Marketing