The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

Programming HP50G
Message #1 Posted by Tulio Franzini on 15 May 2012, 9:53 p.m.

Hello,

I'm trying to insert the return symbol in a program but when I press the right shift (orange) key and the (.), the editor goes to the next line instead of inserting the return symbol in the code. Does anyone know how to do it?

Thanks

      
Re: Programming HP50G
Message #2 Posted by bill platt on 16 May 2012, 8:25 a.m.,
in response to message #1 by Tulio Franzini

What do you mean by "return"? Do you mean the actual symbol--as in "character"? Perhaps it is under the CHARS menu?

Edited: 16 May 2012, 8:27 a.m.

            
Re: Programming HP50G
Message #3 Posted by aurelio on 16 May 2012, 8:55 a.m.,
in response to message #2 by bill platt

No, he means, I think, the orange shifted simbol over the key "." (point)

Edited: 16 May 2012, 8:57 a.m.

            
Re: Programming HP50G
Message #4 Posted by M. Joury on 16 May 2012, 9:41 a.m.,
in response to message #2 by bill platt

As far as I can tell (using Bill's suggestion and looking in the "CHARS" menu) that character is not available as a displayable character. When you press it you get a <CR><LF> or whatever the equivalent is for the 50G.

You could try looking in the CHARS menu to see if any other displayable character fits your needs.

Cheers,

-Marwan

      
Re: Programming HP50G
Message #5 Posted by Tulio Franzini on 16 May 2012, 11:22 a.m.,
in response to message #1 by Tulio Franzini

Thanks for the replies guys. I tried looking for that character in the CHARS menu but it has the same effect. Instead of inserting the character in the code, the editor just skips to the next line. It's weird!

            
Re: Programming HP50G
Message #6 Posted by Tulio Franzini on 16 May 2012, 11:49 a.m.,
in response to message #5 by Tulio Franzini

Maybe I should explain what I'm trying to do because it's possible that I got it all wrong from the start.

So, I'm writing a program and in this program I want a text to be displayed to the user, but I want to split this text in two lines, so it can be shown fully in the screen. Reading the manual, I understood that this can be done by putting the return char in the string. Does anyone know if that's correct? Or maybe is there is an alternate way to do so.

Thanks again

                  
Re: Programming HP50G
Message #7 Posted by Tim Wessman on 16 May 2012, 12:00 p.m.,
in response to message #6 by Tulio Franzini

That is correct. In your program code you will see something like this

<< "My text
line two
line three" >>

That is a 3 line string.

Edited: 16 May 2012, 12:00 p.m.

                  
Re: Programming HP50G
Message #8 Posted by Gilles Carpentier on 16 May 2012, 12:19 p.m.,
in response to message #6 by Tulio Franzini

Hi

" HELLO " 10 CHR + "WORLD !" +

give

"HELLO
WORLD !"

Edited: 16 May 2012, 12:19 p.m.

            
Re: Programming HP50G
Message #9 Posted by Tim Wessman on 16 May 2012, 11:57 a.m.,
in response to message #5 by Tulio Franzini

Not understanding why you think this is strange. When I press ENTER on the keyboard it moves my cursor to the next line during display. The character/characters were inserted and interpreted as expected.

The character is inserted into the text, but when it is being edited in an editor it correctly is interpreted as a new line.

When the content is *printed* such as on the stack, you can control this so that it only displays on 1 line using flag 52. If this is set you will see your character as you are expecting. During any variety of editing though, it will be interpreted as a new line in the editor.

If this is really a big issue for you, you can modify your program to insert the new lines by building your string on the fly.

TW

                  
Re: Programming HP50G
Message #10 Posted by bill platt on 16 May 2012, 12:29 p.m.,
in response to message #9 by Tim Wessman

Now you are reminding me of being in introduction to programmning and learning about "newlin" and other concepts

      
Re: Programming HP50G
Message #11 Posted by Tulio Franzini on 16 May 2012, 1:24 p.m.,
in response to message #1 by Tulio Franzini

I got it now guys! Thanks everyone for the help! I thought that even if I wrote the text in different lines, it would still be displayed in the same line due to the lack of the return character, but it doesnt happen. It's as simple as you guys stated, so thanks!

      
Re: Programming HP50G
Message #12 Posted by M. Joury on 16 May 2012, 1:24 p.m.,
in response to message #1 by Tulio Franzini

Well I completely misunderstood the original question. I thought that Tulio wanted a character that looked like the return character as printed on the keyboard.

Oh well, I think he might have the answer he needs now as there were a couple of suggestion as to how to accomplish what he wants. Another would be to break up the string and display the separate elements at specific row coordinates by using DISP or DISPXY for row and column.

Cheers,

-Marwan


[ Return to Index | Top of Index ]

Go back to the main exhibit hall