linefeed question

Björnke von Gierke bvg at mac.com
Sun Jan 4 09:51:00 EST 2004


You are obviously spoiled by Rev ;)
Whenever you put text from the hard drive into a field in Rev its line 
ending gets transformed into "return", that means linefeed (LF). This 
happens because different platforms uses different line endings for 
their files (Win: CRLF Unix: LF Mac: CR).
However there are cases when that automatic translation does not 
happen, for example when you get data from a socket and put it into a 
variable (tough most standards define LF as line ending anyway). You 
stumbled obviously over such a case. now you need to get rid of the 
extra CR. BUT BEWARE: "CR" means the same as "LF" in RunRev (see entry 
for "Return" in the docs), that is why you need to do the numtochar(13) 
thing. I recommend this code:

replace numtochar(13) with "" in field "your field here"

On Sonntag, Jan 4, 2004, at 14:02 Europe/Zurich, Chipp Walters wrote:

> Last I checked, return can mean different things on different 
> platforms. By
> using the numToChar function, you can be certain of only a specific
> character code.
>
> -Chipp
>
>
>>
>>> One approach is to remove the numToChar(13)
>>> characters.
>>
>> is numToChar(13) somehow safer than "return"?
>>
>> =====
>> erik at erikhansen.org    http://www.erikhansen.org
>>
>> __________________________________
>> Do you Yahoo!?
>> New Yahoo! Photos - easier uploading and sharing.
>> http://photos.yahoo.com/
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list