Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird behavior with chr(10)
Message
From
18/01/2023 12:02:17
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
18/01/2023 11:45:03
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01685827
Message ID:
01685843
Views:
22
>>>>>Sooo this is for curious people :-D
>>>>>
>>>>>I'm building text that will go in an email. It's very important that all the CHR(10) are functioning properly.
>>>>
>>>>Then the question is, was the LF char in the output at all? Else it is a problem of the program browsing.
>>>>
>>>>AAAND do not use TEXT TO with data holding LF only. This is a cool way to loose the information. See https://github.com/VFPX/GoFish/issues/27#issuecomment-1308245572
>>>
>>>The (in)famous case of crlf is the one case when multiple cooks on the same pot don't necessarily mean you end up with too much salt. The result may contain no salt at all.
>>
>>No is the safe solution. giggle

>If there's no salt, there's nothing to dissolve. So you got solvent but nothing solvable, so no solution. Ask any chemist.
>>Anyway, since computers text is an offspring of typewriters, it's logical to have LF and CR separated. :)
>
>Not directly, lineage goes through teleprinters. There you didn't have a single lever which did both (LF by three sprockets on the cogwheel under the lever, CR by pushing the whole drum to the left), but rather two electromagnetic things, one to roll the drum by one line (LF) the other to push it to the left (return the carriage, please). Most of the lower 32 characters of the ASCII set also originate from teleprinters - chr(7) actually rang a physical bell.

Teleprinters are a kind of electro-mechanic typewriters, the ideas originate there. All what you describe is on a typewriter, even the signs and placement for caps and caps lock. The most typewriters own this lever what in fact generates CRLF. If you push it, the carriage will return to first pos on line (CR), then block and there will be enough force to turn the drum to the next line (LF) The sign on kbd simulates this lever. (That's why it is, read from left to write, wrong) The bell was there to notify carriage-is-close-to-EOL
:)
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform