HMS commands



#2

In an app/program I want to inputs the hexagesimal number 2.3 (02:30) and then convert it to decimal (2.5)

I see how to do this in home or cas using ->HMS(2'30") or HMS->(2'30"). But how do I make an INPUT command imbedded in the program to convert 2.30 (hrs.min) into 2.5 (decimal).

That is using old terms:

2.5             (2 hours decimal 5)
ENTER
->HMS
2.3 (2 hours 30 minutes)

Or

2.3 (2 hours 30 minutes)
HMS->
2.5 (2 hours decimal 5)

Thanks!

Edited: 14 Oct 2013, 1:43 a.m.


#3

What type of machine are you using?


#4

I'm pretty sure Geoff is asking for a solution on the Prime.


#5

Yes, having trouble asking for an input on a program in a simple dceimal time representing a hexagesimal number.

best explained with an example:

Old school:

KEY PRESS      DISPLAY

2.30 2.30
HR (HMS->) 2.50 This involves four keystrokes.

Converting back an forth was easy. Now to convert it is:

HMS->(2'30")   2.5    This involves nine keystrokes!

So in a nutshell I want the program to prompt for a hexagesimal number in the form of the old school format '2.3' and convert that to '2.5' decimal format. At the moment I need to input '2.3' by invoking the hexagesimal shift key and inputting with the tags, degrees, minutes and seconds.

Or is there a simple HMS command, (can't find it).

Cheers, Geoff


#6

There is an HMS-> and ->HMS. Easiest way to get them for use in your program is look under the "more" category in your CMDS menu button in the editor.

If you mean readily available in a menu somewhere for use inside the input box, then no. However, there is a template item specifically for entering without needing to do shift a b/c over and over. Look in the template key (the "C" button) down in the bottom right.

TW

Edited: 14 Oct 2013, 5:02 p.m.


#7

thanks Tim,

i can't say it enough, i haven't had this much fun programming since the 25, 65, 67, 41C series, 71B.

Never caught on to RPL as much but this is addictive.

"If you mean readily available in a menu somewhere for use inside the input box, then no"

thats what i was trying to do ;-O

Yes I see the HMS functions, just trying to be lazy and make the code do the work.

Edited: 14 Oct 2013, 5:36 p.m.


#8

Well, glad you are having fun.

Keep poking holes in things and hopefully it will give us more ways to make it better.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Programming with CAS commands (e.g., arcLen) Helge Gabert 8 349 10-01-2013, 04:08 PM
Last Post: Helge Gabert
  [HP-Prime xCAS] Arrays: Programming Commands (solution to the ambiguity) CompSystems 6 356 08-30-2013, 06:32 PM
Last Post: CompSystems
  [HP Prime CAS] Solve Commands (Bugs and Request) CompSystems 10 483 08-08-2013, 12:34 PM
Last Post: Gilles Carpentier
  HP 85A. GET and SAVE commands. inaki 6 298 06-05-2013, 06:45 AM
Last Post: Paul Berger (Canada)
  8/60 -> HMS PGILLET 47 1,490 05-04-2013, 11:38 AM
Last Post: Thomas Klemm
  CAS hp50g non equivalent commands peacecalc 0 110 12-16-2012, 02:47 PM
Last Post: peacecalc
  HP42s WP34S commands Geoff Quickfall 8 300 06-18-2012, 12:08 AM
Last Post: Walter B
  [WP34S] Documentation for Advanced Programming Commands and Techniques Les Wright 4 209 04-08-2012, 02:17 AM
Last Post: Paul Dale
  Re: more HMS, aTIME, 34s display, 41c bugs? Christopher Johnson 0 91 03-05-2012, 11:20 AM
Last Post: Christopher Johnson
  more HMS, aTIME, 34s display, 41c bugs? Christopher Johnson 2 144 02-25-2012, 10:06 PM
Last Post: Luiz C. Vieira (Brazil)

Forum Jump: