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?

  - Dave R. -


--
riv...@dignus.com                        Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to