Re: UserRPL Programming problem



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".
.



Relevant Pages

  • Re: Where does fmtutil get its inputs?
    ... Here I first look into fmtutil.cnf to see that the 'latex' format ... uses the pdfetex engine. ... the command - thanks. ... been able to work out what texconfig does exactly, ...
    (comp.text.tex)
  • when section heading at top of page, top margin wrong!
    ... For a thesis, my university requires a top margin of 1" throughout, ... % and format the table of contents. ... \doublespacing % command from setspace package to invoke double ... reduce vertical space by 7pt. ...
    (comp.text.tex)
  • Re: Forgot to put old_rootvg to sleep before reboot - How to Wake
    ... Performs operations on existing alternate rootvg volume groups. ... To rename Alternate Disk Volume Group: ... The alt_rootvg_op command can be used to determine which disk is the ... flag) can be executed at this time. ...
    (comp.unix.aix)
  • Re: SIMPLE question [Was: Re: TIP #193: Simple Syntax Help System
    ... the "cmdline" package (command line arguments); ... For each boolean flag in the argument list, ... An argument declaration can specify this field if and only if its ... The system builds the command line options usage string. ...
    (comp.lang.tcl)
  • Re: Debug.exe for win32
    ... Format is: n) e address t=n ... Display the debug registers. ... R DRx command. ... The help output can be limited by specifying the first letterof the ...
    (alt.lang.asm)