Re: how to display and copy long formula from HP50 Stack?



On 29 Apr, 05:47, "John H Meyers" <jhmey...@xxxxxxxxxxxxxx> wrote:
On Mon, 28 Apr 2008 16:16:08 -0500:

Wes:

If you have some other type, such as a symbolic,
use the \->STR command to convert it to a string,
then copy it to the Windows clipboard.

Whenever 8-bit characters are involved
(e.g. summation, integral and derivative symbols, pi, infinity,
"less or equal" symbol, program delimiters, Greek letters, etc.)
the possibility arises of different displays or interpretations,
whenever transporting these strings
between the (emulated) calculator, whose character set
is similar to ISO-8859-1 (more info below),
and the far larger and more varied world of
numerous character sets used in computer applications,
which have only the "ascii" subset in common.

So the HP48/49/50 all have a built-in system,
capable of "translating" any string to pure ascii,
and vice-versa.

The original software for calculator <-> computer transfer
(including the calculator's internal version of Kermit)
can perform these translations automatically,
but the emulator's Copy/Paste string functions do not,
and neither does copying text to or from an SD card,
so that's where you might consider replacing \->STR and STR\->
by small calculator programs which include the same translations,
in a way that's compatible with all computer programs, editors,
displays, printers, email, web pages, newsgroup postings, etc.

The following post starts off with very simple versions,
and also includes fancier optional versions to process a "header,"
which the calculator can also use to indicate its own mode settings:

"Ascii Import/Export for SD card and Emulator" [for all HP48/49/50]http://groups.google.com/group/comp.sys.hp48/msg/4e7ed90b3cf11c42

There are also computer programs or scripts to do the same,
but why bother when any real or emulated calculator is involved,
which can do this by itself?

Treatises on character sets:

http://htmlhelp.com/reference/charset/

ISO-8859-1 explicitly does not define displayable characters
for positions 0-31 and 127-159, and the HTML standard
does not allow those to be used for displayable characters.
The only characters in this range that are used are 9, 10 and 13,
which are tab, newline and carriage return respectively.
If you attempt to display these invalid characters on your own system,
you may find some characters displayed there,
but please do not assume that other users will see the same thing
(or even anything at all) on their systems.

ISO alphabet souphttp://www.unicodecharacter.com/charsets/iso8859.htmlhttp://aspell.net/charsets/iso8859.html[same]http://www.cs.tut.fi/~jkorpela/latin9.html["-1"; vs. "-15"]http://en.wikipedia.org/wiki/ISO_8859http://www.searchfreefonts.com/articles/article-38.htmhttp://turnbull.sk.tsukuba.ac.jp/Tools/I18N/LJ-I18N.html[Japan]

Meanwhile, back in Emu48/49:

Giancarlo:

the "Copy Stack" command of Emu48 only works with strings

Originally so, when called "Copy string,"
but since being called "Copy stack,"
it also works with numbers (real and integer),
producing what STD mode would display
(even if current number display mode isn't STD).

"Paste string" originally could be relied upon
to paste only a string, but "paste stack" now
also _interprets_ anything resembling a number,
sometimes inadvertently converting an integer string
to a real number object, or even converting a hex string,
e.g. "4162080000210" to either a large integer or real number,
whereas it actually represents the integer object 12,
if only it could be left as a string when pasted,
so that H\-> could then properly be applied to it
(similarly with S\->H and H\->S, or strings of digits
meant to remain as nothing but strings of digits).

No confusion was introduced into Emu48 by generalizing "Copy stack"
to include more objects, but generalizing "Paste stack"
to assume that all "numeric-like" strings
should be immediately interpreted as numbers
can be mistaken, because a string of digits, for example,
might need to be left as exactly that, for other uses.

[r->] [OFF]

John,
thank you for your - as usually :-) - highly informative reply.

Best regards.
Giancarlo
.



Relevant Pages

  • Re: How to convert Infix notation to postfix notation
    ... If this is for an error message, why isn't it using stderr for its output? ... array of 15 characters, and you call this function with the limit 15 on ... Making sure that the only string I allocate and append to, ... because mulFactor in all versions must needs incorporate the functions ...
    (comp.lang.c)
  • Re: Prothon should not borrow Python strings!
    ... """It does not make sense to have a string without knowing what encoding ... same cul de sac as Python. ... Prothon_String_As_ASCII // raises error if there are high characters ... Python's split between byte strings and Unicode strings is ...
    (comp.lang.python)
  • Re: Letter to US Sen. Byron Dorgan re unpaid overtime
    ... put them in stupid places. ... Programming is difficult (as you must surely appreciate, ... > strings will be in the range 1...1000 characters. ... impose an artificially small limit on string length." ...
    (comp.programming)
  • Re: Fast UTF-8 strlen function
    ... >> Is there a fast UTF-8 string length function floating around? ... Length in bytes, or length in characters? ... For UTF-8, the main basic "change" you have to make to your string routines ... then I could individually look up the characters in my UNICODE ...
    (alt.lang.asm)
  • Re: Byte Array to String
    ... retrieved text will mismatch the original characters. ... encoding the characters. ... Dim strFileData as String ...
    (microsoft.public.dotnet.framework.aspnet)