For programming I do a lot of conversion from hex to dec / oct.
Yes I know: #123h dec or #123o hex etc.
But i find it very hard to always type rightshift-# and the 'h' or
'o'.
Is there an easyer way, just like e.g. switch to hex-mode, enter 123
(without # and h), switch to oct?
bye,
Oliver
HOW TO AVOID THE LETTER:
Press MTH BASE, and you'll see the four available bases in the
menu. Set the base you want to input, type the number (with a #
in front, but no letter at the end), and when you press ENTER
the HP48 will append the proper base letter for you. Then merely
press the desired output base, and there it is! No need to type
the letter.
HOW TO AVOID THE #:
Use the "vectored enter" feature of the HP48. For details of how
that works, as well as a program that uses it specifically for base
calculations, see VECTORED.DOC either on Goodies Disk #7 or here:
http://www.dejanews.com/getdoc.xp?AN=189496830
Hope this helps!
-Joe-
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
> I do a lot of conversion from hex to dec/oct.
> I know: #123h dec or #123o hex etc.
> But i find it very hard to always type rightshift-#
> and the 'h' or 'o'
One idea is to go to the MTH BASE menu (15 MENU in 48G*)
Before you type any value, press the base key for the base
in which you are going to type the new value; then you
do not need any trailing lower-case letter to specify
the input base, but you still do need the RS # keys;
a user key assignment (Chapter 30) could take care of this as well.
Another approach is to make your own menu, e.g.:
\<< { HEX DEC OCT BIN { } "#" } [T]MENU \>>
Now you have the "#" key in the menu as well;
the only thing you lost was the "mode indicator"
in the "base" keys, to tell you which is the current mode
(but you can look at any stack value to see this);
fancier programs can be used to re-create "mode keys" in menus.
If you use the above program, the TMENU command will make
a temporary menu; the MENU command will also save the menu
in a 'CST' variable, so that the CST key will re-display it
at any future time.
-----------------------------------------------------------
With best wishes from: John H Meyers <jhme...@mum.edu>
hey, that vectored enter is very powerful. Exacly what I want. :-)
Thanks to Joe and John for the quick answer.
Bye,
Oliver
-------
* if you're going to change everything on the stack, the program would also
have to check to see if it was a valid binaryial number first...???
and also, instead of different program for each base, you'd write one program
to add the # and the binary notationator b,d,h or o, and then set that at the
beginning, 2 for Binary, 10 for Decimal...ect...and then activate your 'general
solution' program...
all that, from the users perspective, would be invisible--of course...
???
----------- :: o
.---..-..-..-..-..-..-. . .-. .-. .-..-..-.. .-.
`| |'| || .` | > / \ \/ \/ / / \ | .` || | ) / \
`-' `-'`-'`-' `-' `. ^ .' `--^--'`-'`-'`-'' `--^--'
RefuteEnlightenmentWithTheMonotonyOfPlainExistence
<joe...@usa.net> schrieb in im Newsbeitrag:
7etqdp$g12$1...@nnrp1.dejanews.com...
> HOW TO AVOID THE LETTER:
[snip]
> HOW TO AVOID THE #:
[snip]
At first the vectored enter didn't work for me, but now I figured it
out: some program must have assigned an action to the enter key
(51.1)! I played a bit with 'ASN' and it seems that when you press
enter the assigned action is executed first and then the aENTER. A
'double-vectored' enter? Cool. :-)
bye,
Oliver