Line break vs. carriage return pasting clipboard data into Protonmail

After literally decades of using a simple database from which I get address information without problems I migrated to Protonmail. I found that my simple macro for pasting address information was not working. The routine used Carriage Return CHR(13). I was forced to take the clipped data and paste it into a word processing document and then copy it again. Or into stickies.

I searched this forum and got the idea of trying Line Break CHR(10) and the problem disappeared.

Here is my simple question. Is Line Break CHR(10) what I should generally be using going forward with Pan X? I never really totally digested the difference between the two. After a third of a century plus with ProVue software suddenly Carriage Return raised its head as a problem


Carriage return was the preferred line ending for Carbon applications, and line feed chr(10) is the preferred line ending for Cocoa applications. Carbon is going the way of the dodo bird, and while many cocoa applications will accept carriage returns, you aren’t likely to go wrong with line feed.

I’ve run into conflicts with this constantly too having worked with ¶ for ages.

David is right though that they’re history.

Learn to use crtolf( on text wherever you might have carriage returns and you’ll fare much better.

Thanks Gentlemen.

I was always a bit mesmerized by what seemed ostensibly redundant roles.

Line Feed it is going forth.

And I will add crtolf( to my Panorama X Lexicon.

A bit of history - starting in 1984, the original Macintosh used the carriage return character between lines, which is chr(13). UNIX, however, has always used a linefeed between lines, which is chr(10). (To further confuse things, DOS traditionally used both – cr followed by lf.)

Mac OS X is based on UNIX, so it generally uses linefeeds. But not entirely – OS X for many years allowed software written for the original Macintosh to continue to run, first as “Classic” apps, then as “Carbon” apps. These apps (including Panorama 6) continued to use carriage returns.

If you wrote code in Panorama 6 or earlier, that code would assume carriage returns. So to maintain compatibility with existing code, Panorama X still mostly uses carriage returns. But if you’re transferring text to other programs, you’ll usually want to use linefeeds. In some cases Panorama does that automatically, for example when exporting text. Though if you were exporting to a Windows computer, you might want to use cr-lf. Unfortunately there’s no one universal answer. What many programs will do is accept any of these delimiters, Panorama does this. So Panorama will automatically import text with carriage returns, linefeeds, or both. It sounds like Protonmail doesn’t do this.

Panorama X does make it easy to do this conversion when needed with the crtolf( function, as James pointed out. There is also a lftocr( function to go the other way. Also, there is a cr() function which I would suggest instead of chr(13), and a lf() function to use instead of chr(10). Either will work, but I think the cr() and lf() functions are more clear if you come back later and look at your code.


Great history lesson Jim.

Now I don’t feel so bad that I was confused!

I think.