I'm a new HP48 user who recently inherited my dad's old 48G. I have a question about 48 source code with slashes. In the Advanced User's Guide, there are no slashes in the program listings, but in the source on the Goodies Disks and most places online (i.e. at http://www.hpmuseum.org/software/48vigenc.htm), there are slashes "\" before each << and >>. Can someone clue me in as to what these signify, and whether they are necessary?
Slashes in HP48 source code
|
|
« Next Oldest | Next Newest »
|
▼
02-03-2006, 10:47 PM
▼
02-04-2006, 01:06 AM
Those back-slashes are used to represent the 48G characters with ASCII codes above 127 with characters in the first half of the ASCII table, which is standard for all code pages. For instance, \<< and \>> stand for the program delimiters and \PI stands for the pi symbol. Refer to the HP 48G User's Guide, page 27-16, for the complete ASCII Characters Translations table.
02-04-2006, 01:07 AM
Those slashes mark characters that don't have equivalents in ASCII. A 48/49 series calculator will insert them into an RPL program transferred in "text" mode to a PC. So, for example \<< stands for the character with decimal code 171 in the calculator's character set. \>> similarly stands for the character with code 187. If you type these translated codes into a source file on the PC, then transfer it to the calculator in text mode, the kermit server will do the opposite translation, from the backslash escaped codes to the ASCII equivalent. The hp 49g+ & 48gII_advanced user's reference manual (HP link) has a table of these translations in Appendix J. I think they are broadly similar to the 48G translations, though there might be differences in detail.
Regards,
02-04-2006, 12:50 PM
So, if I was going to type a program directly into my calculator from a source file on my computer, I would simply ignore the replace \<< and \>> with << and >>, and other characters such as \pi with the actual pi symbol? ▼
02-04-2006, 02:06 PM
Quote: That's right. Most of the escaped symbols are easy to guess, like \>>, \<< and \->. For others you need the tables Gerson and I pointed you to.
Quote: No. I'm culturally isolated. 8)
Regards, |