The Museum of HP Calculators

HP Forum Archive 07

[ Return to Index | Top of Index ]

hp 42s combining strings
Message #1 Posted by Shawn on 5 Mar 2002, 11:46 a.m.

Trying to combine 2 strings, apparently you can have up to 15 characters in the alpha register, i seem to be able to put more (not the storage reg., only 6 in there.) What I want to do is append the 2nd string to the 1st string. I know the append function is that sideways "T" but it doesn't work in this case.

Here's my program, 01 LBL "TEST" 02 "<=" 03 ARCL 10 04 "D=" 05 ARCL 11 06 AVIEW 07 END

I would like the end result in the alpha register to be... <=90.0000D=10.0000 Any help thanx Shawn,,,,MeisterEister@aol.com

      
Re: hp 42s combining strings
Message #2 Posted by Andres C. Rodriguez (Argentina) on 5 Mar 2002, 12:44 p.m.,
in response to message #1 by Shawn

If I recall correctly, an extra "enter" at the beginning of the string will enable the append mode.

            
Re: hp 42s combining strings
Message #3 Posted by shawn on 5 Mar 2002, 2:54 p.m.,
in response to message #2 by Andres C. Rodriguez (Argentina)

right, i know the append symbol but it doesn't work either. thnx for the reply

                  
Re: hp 42s combining strings
Message #4 Posted by Chris Randle (Lincoln, UK) on 5 Mar 2002, 3:34 p.m.,
in response to message #3 by shawn

It works OK for me. Typed in your prog, but before each line with alpha code, I typed (Shift) ALPHA ENTER, then the text. This gave a line like this, for example:

04 |-"D="

The bar-hyphen was a single char; a T on its side as you described it. Replacing all alpha lines in this way gave exactly the output you wanted.

                  
Re: hp 42s combining strings
Message #5 Posted by Vieira, Luiz C. (Brazil) on 5 Mar 2002, 3:38 p.m.,
in response to message #3 by shawn

Try this:

01 LBL "TEST"
02 "<="
03 ARCL 10
04 |-" D=" (the |- symbol is entered by pressing [ENTER] in ALPHA mode, as Andrés mentioned) 
05 ARCL 11
06 AVIEW
07 END

This should work. Unless you are trying to place D=value in the lower line; if so, you'll need the Line Feed (LF) character, available at ALPHA, PUNC, down-arrow, last-softkey. Your program would look like this:

01 LBL "TEST"
02 "<="
03 ARCL 10
04 |-"LF D=" (the LF symbol is one-character wide) 
05 ARCL 11
06 AVIEW
07 END
Forgive-me if this is not what you want, but it may be helpfull one day.

Cheers.

      
Thnx so much, it works great
Message #6 Posted by shawn on 5 Mar 2002, 5:47 p.m.,
in response to message #1 by Shawn

thnx, 42 rulz


[ Return to Index | Top of Index ]

Go back to the main exhibit hall