Re: UserRPL Programming problem
- From: Virgil <virgil@xxxxxxxxxxx>
- Date: Mon, 26 Mar 2007 01:57:32 -0600
In article <1174890672.011016.300800@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
francosarcina@xxxxxxxxx wrote:
Hi all,
I'm trying to resolve a problem with my 50g: I have three variables
"y", "m" and "d" that contain respectively year, month and day of a
certain date.
I vant to do some action only if that date is after a given date (for
example, August 14, 1996). The quickest mode that I've found is to
divide month and day respectively by 100 and 10000, sum these number
and make the test. Example:
y m 100 / + d 10000 / + -> test
IF test 1996.0814 > THEN...
It works, but I'm not satisfied. It's inelegant.
There is a more elegant way to do this task with my 50g?
Greetings,
Franco
Are you aware of the built in time functions?
When flag -42 is clear a date is indicated by the format mm.ddyyyy.
Or when flag -42 is set by format dd.mmyyyy.
The DATE command will return the internal HP's clock/calendar current
date, and ->DATE will set the date to the level 1 value, provided it is
in an acceptable date format.
With one date on level 2 and another on level 1, in the appropriate
format for the -42 flag setting, the DDAYS command will return a
positive number of days if the level 1 date is later than the level 2
date and a negative if the reverse. And , of course, 0 if they are the
same.
These date/time commands are accessible by left-shift 9,
then choosing "Tools".
.
- Follow-Ups:
- Re: UserRPL Programming problem
- From: Franco
- Re: UserRPL Programming problem
- References:
- UserRPL Programming problem
- From: francosarcina
- UserRPL Programming problem
- Prev by Date: Objects on SD card
- Next by Date: Re: help please.....
- Previous by thread: UserRPL Programming problem
- Next by thread: Re: UserRPL Programming problem
- Index(es):
Relevant Pages
|