Post Reply 
Special HP50G Program for replacing " or other signs
11-05-2019, 01:34 PM
Post: #1
Special HP50G Program for replacing " or other signs
I use Android Emu 48,a great application.

I have the following HP50G program
« 100 "abc" 200 "->def"» 'P1' STO.

I want to see, in a doc like Word, the full steps of P1.
For that, I have to copy the content of P1 to (Word) doc.

Normally easily done if it were
« 100 200 » : I would change the prog into a string
"100 200" and use the Copy-to-stack of Emu48 and then Paste (Contr+V) in the (Word) doc.

With « 100 "abc" 200 "», however, the inner strings of P1 does not help and allow it ss it is.

1) First, I have to put P1 in the stack.
2) Edit it
3) Use the REPLACE command of Edit.
4) And replace all the " characters by, for example, $,
to get « 100 $abc$ 200 $->def$».
5) Then I can convert this new program into the required string "« 100 $abc$ 200 $->def$»" to use the copy-stack command of Emu48 and copy the above string in my (Word) doc.

I want a first program P.Prog->String of the kind
« EDIT...
search for sign " and replace by...
search for sign - > and replace by...
search for all special signs not taken into account during the transfer and replace them by...
»

(working as follows:
« 100 "abc" 200 "->def"»
ENTER
P.Pring->String
EVAL or ENTER
« 100 $abc$ 200 $#def$»)

and a 2nd one, P. String->Prog. Bck, to convert back
"« 100 $abc$ 200 $#def$»" into
« 100 "abc" 200 "->def"».

Ideally, both programs should convert all the strange characters in one execution ; and better : use the prog once for all the variables in a directory.

Could somebody help me?

I thank you in advance for your valuable contribution.

Regards,
Gil
Find all posts by this user
Quote this message in a reply
11-06-2019, 08:19 PM
Post: #2
RE: Special HP50G Program for replacing " or other signs
Use these two programs originally by John H. Meyers.

'IN'
Code:
@ 7-bit ascii string -> calc object
\<< \->STR 3 TRANSIO RCLF SIZE 3 >
#2F34Dh #3016Bh IFTE SYSEVAL + STR\-> \>>

'OUT'
Code:
@ Calc object -> 7-bit ascii string
\<< STD 64 STWS \->STR 3 TRANSIO RCLF SIZE 3 >
#2F34Fh #2FEC9h IFTE SYSEVAL \>>

Usage: Put the object you want to export onto the stack and run OUT. This converts it to a fully-escaped string that you can cut and paste into a file on your PC. The program IN does the reverse: paste the converted string into the stack, run IN and it is converted back to an RPL object
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)