On 2020-09-02 16:34, Thomas David Rivers wrote:
Robert Prins wrote:

Dear all,

A few days ago I posted the following to <news://comp.lang.pl1>, addressed specifically to Peter Elderon:


"And the corresponding PL/I source is ?"

Note for what follows: PL/I has a truckload of builtin functions to work with dates and times, but none of them seem to cater for times in just minutes, as opposed to seconds or even micro-seconds.

The reason for asking the question? The two statements in question

min_max_line.t_max_hh = dtot.t_max / 60;
min_max_line.t_max_mm = mod(dtot.t_max, 60);

copy a time (in minutes, in packed format) to a print-line, in hh:mm format, which means splitting up said time into hh & mm by a division and a remainder, which, given that times can not be negative, can use PL/I's "MOD(ulo)" builtin function although obviously(!) that is not the best thing to do, as modulo and remainder may not have the same sign, given that modulo is defined as

Sorry if it's obvious from the posting - but I was wondering what the
type of "t_max" might be and if it (well "dtot") happens to be BASED?

Ooooops!

2 dtot,
  3 l_max         fixed    (9,1) init (0),
  3 l_min         fixed    (9,1) init (9999.9),
  3 t_max         fixed      (9) init (0),
  3 t_min         fixed      (9) init (5999),
  3 v_max         fixed   (13,9) init (0),
  3 v_min         fixed   (13,9) init (9999.999999999),

And the variables are part of the same (huge) "lift_work" automatic structure.

Robert
--
Robert AH Prins
robert.ah.prins(a)gmail.com
The hitchhiking grandfather - https://prino.neocities.org/indez.html
Some REXX code for use on z/OS - https://prino.neocities.org/zOS/zOS-Tools.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to