Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating and saving multiple texts
Message
From
24/05/2010 14:16:37
 
 
To
23/05/2010 18:15:24
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01465655
Message ID:
01465747
Views:
46
>Good. Chr(13) + chr(10) is the standard combination for end-of-line in Windows and DOS; unfortunately, other systems use other combinations. For Excel Automation, I had to use chr(10) only, if I remember correctly - the chr(13) shows up as a big ugly rectangle.

As you stated CHR(13)+CHR(10) (carriage return followed by line feed) is used by DOS and Windows as an end-of-line sequence
Unix traditionaly uses CHR(10) (line feed)
Some systems used CHR(13) (carriage return) -- I do vaguey recall this, but I don't recall which ones (it migh've been the Sinclair ZX-80/81 micros, along wih a few others).
And of course there is fun with dealing with other character codes like EBCDIC... or CDC 6-bit and 6/12-bit character codes (Since 6-bit code doesn't allow for "invisible" control codes, things like EOF and EOLN were defined according to specifc bit-patters that were aligned to a word boundary, which were 60 bits long)...
There were also a few systems that used CHR(10)+CHR(13) (line feed followed by carriage return). The hard bit was visually speaking, the effect was indistiguishable from the CHR(13)+CHR(10) sequence if you simpy display the file -- it's when your text editor did strange things with the text (e.g. everything gets double-spaced and last character of each line or first character of each line gets "eaten") that you notice something is amiss.

And to think... all this confusion with just a "simple" text file...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform