HP50G - Viewing .txt Files on SD Card without CR Characters - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: HP50G - Viewing .txt Files on SD Card without CR Characters (/thread-14974.html) |
HP50G - Viewing .txt Files on SD Card without CR Characters - Michael Lopez - 05-12-2020 07:51 AM Hi all, Have been using HP48 series & 50G calculators for a long time & have developed a large number of programs & equations. Whilst I use many of these on an almost daily basis & can mostly remember the assumptions, units etc., I'd like to improve the documentation available on my calculators. In the case of most of my programs, I have been using an excellent small application by John Meyer, which he named CHOOSF, to display all the relevant information. Whilst this works fine, the text needs to be in the form of a list using "..." & hence not as convenient to create or edit as a text file. Recognising that the built-in FILER can view text files on the SD card, I created some documents on my PC & have been using these. However, I find them a bit annoying to view due to the carriage return characters being shown. Is there anything I can do to hide the carriage return characters or an alternative viewer I can use to read text files on the SD card? Many thanks, Michael RE: HP50G - Viewing .txt Files on SD Card without CR Characters - BruceH - 05-12-2020 12:53 PM It's because you're using DOS format files which use carriage return plus linefeed to denote the end of line. If you switch to Unix format (linefeed only) then the file appears without the square blobs at the end of each line. Your editor might have the option to use Unix format otherwise there are many DOS2UNIX type programs that will do the conversion for you. RE: HP50G - Viewing .txt Files on SD Card without CR Characters - John Keith - 05-12-2020 04:15 PM On the HP 50, put the text file on the stack and execute Code:
That will get rid of the annoying CR's. RE: HP50G - Viewing .txt Files on SD Card without CR Characters - 3298 - 05-12-2020 07:43 PM ... but this on-calc solution has the slight drawback that when you store the string back onto the SD card, it's guaranteed* to have the "HPHP49-C..." header of an RPL object. That's irrelevant if the file is only opened on the calculator afterward (and it would be made upon any write operation from the calculator, not just this adjustment), but if the edited file gets opened on a computer again, you may be annoyed by having to delete that header. For that reason I'd call the format conversion on PC (whether by editor settings or by dedicated conversion programs) superior, if only slightly. *Technically there is a way to store a string into an SD file without the header using an ARM code program to bypass the the default handling for storing files onto the SD card, but that's not available out of the box. The documentation for SDRSTO from SDLIB appears to say that it's such a program. RE: HP50G - Viewing .txt Files on SD Card without CR Characters - Michael Lopez - 05-13-2020 12:50 AM Hi all, Thanks for your advice & suggestions. Have tested both solutions & they work well. Cheers, Michael |