From: "Joe Monk" <joemon...@gmail.com>
Sent: Monday, September 07, 2020 1:05 PM


"No it isn't.  4/3 yields 1.333333... to 15 digits,
and is of precision (15,14)"

Depends on RULES(IBM) or RULES(ANS). If its RULES(IBM) it will never be
integer division. If its RULES(ANS) and the operands are unscaled, then it
will be integer division.

No it doesn't. See results appended to program.

INTEGER_DIVISION:
  PROCEDURE OPTIONS (MAIN);
  DECLARE (A, B) FIXED DECIMAL (15);

  A = 4; B = 3;

  PUT (4/3);
  PUT (A/B);
  PUT ( (A/B) * 6 );

END INTEGER_DIVISION;
/* RESULTS:
1.33333333333333 1 6 */
On Sun, Sep 6, 2020 at 7:34 PM Robin Vowels <robi...@dodo.com.au> wrote:

On 2020-09-07 09:35, Joe Monk wrote:
> "PL/I doesn't have integers."
>
> Sorry Shmuel, youre incorrect.
>
> FIXED BINARY (15,0) is a 2 byte integer and FIXED BINARY (31,0) is a 4
> byte
> integer.
>
> "The ratiio 4/3 is FIXED BIN,"
>
> No, its FIXED DECIMAL (1,0)...

No it isn't.  4/3 yields 1.333333... to 15 digits,
and is of precision (15,14)

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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