Re: PL/I Integer arithmetic

2020-09-09 Thread Robin Vowels
- Original Message - From: "Seymour J Metz" Sent: Thursday, September 10, 2020 1:02 AM You did, in the comment. No I didn't. You misread it. From: IBM Mainframe Discussion List on behalf of Robin Vowels Sent: Wednesday, September 9, 2020

Re: PL/I Integer arithmetic

2020-09-09 Thread Seymour J Metz
wels > Sent: Wednesday, September 9, 2020 10:08 AM > Subject: Re: PL/I Integer arithmetic (was: Constant Identifiers) > > From: "Seymour J Metz" > Sent: Monday, September 07, 2020 4:13 PM > > >> PL/I has never had integers. > > It always has had integers. > &g

Re: PL/I Integer arithmetic

2020-09-09 Thread Robin Vowels
, September 9, 2020 10:08 AM Subject: Re: PL/I Integer arithmetic (was: Constant Identifiers) From: "Seymour J Metz" Sent: Monday, September 07, 2020 4:13 PM PL/I has never had integers. It always has had integers. The arithmetic rules for scaled fixed point are different from those fo

Re: PL/I Integer arithmetic.

2020-09-09 Thread Robin Vowels
On 2020-09-10 00:32, Seymour J Metz wrote: The results that you have described are not integer arithmetic. In integer arithmetic, 4/3 is 1. Look at the second result following the program. You will see that A/B == 4/3 yields 1. From: IBM Mainframe Dis

Re: PL/I Integer arithmetic (was: Constant Identifiers)

2020-09-09 Thread Seymour J Metz
Since when is 1.33... an integer? -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of Robin Vowels Sent: Wednesday, September 9, 2020 10:08 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: PL/I

Re: PL/I Integer arithmetic. (was: Constant Identifiers)

2020-09-09 Thread Seymour J Metz
, 2020 10:14 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: PL/I Integer arithmetic. (was: Constant Identifiers) - Original Message - From: "Seymour J Metz" Sent: Monday, September 07, 2020 3:02 PM Subject: Re: Constant Identifiers 4/3 yields 1.3, 04/3 yields 1332, ... Rubbish.

Re: PL/I Integer arithmetic. (was: Constant Identifiers)

2020-09-09 Thread Robin Vowels
- Original Message - From: "Seymour J Metz" Sent: Monday, September 07, 2020 3:02 PM Subject: Re: Constant Identifiers 4/3 yields 1.3, 04/3 yields 1332, ... Rubbish. 4/3 yields 1.33 INTEGER_DIVISION: PROCEDURE OPTIONS (MAIN); DECLARE (A, B) FIXED DECIMAL (15); A =

Re: PL/I Integer arithmetic (was: Constant Identifiers)

2020-09-09 Thread Robin Vowels
From: "Seymour J Metz" Sent: Monday, September 07, 2020 4:13 PM PL/I has never had integers. It always has had integers. The arithmetic rules for scaled fixed point are different from those for integers. In integer arithmetic, (4/3)*6 is 6 That's not the result you get in PL/I. Yes it i

Re: PL/I integer arithmetic

2020-09-07 Thread Joe Monk
"The maximum number of decimal digits allowed is 15. Default precision, assumed when no specification is made, is (5,0). The internal coded arithmetic form of decimal fixed-point data is packed decimal. Packed decimal is stored two digits to the byte, with a sign indication in the rightmost four bi

Re: PL/I integer arithmetic

2020-09-07 Thread Robin Vowels
You think that I am not looking at IBM's PL/I LRM? On 2020-09-07 23:25, Joe Monk wrote: The answer is here: https://www.ibm.com/support/knowledgecenter/SSY2V3_5.2.0/com.ibm.ent.pl1.zos.doc/lr/resarithoprt.html Joe -- For IBM

Re: PL/I integer arithmetic

2020-09-07 Thread Joe Monk
The answer is here: https://www.ibm.com/support/knowledgecenter/SSY2V3_5.2.0/com.ibm.ent.pl1.zos.doc/lr/resarithoprt.html Joe On Mon, Sep 7, 2020 at 8:12 AM Robin Vowels wrote: > You are looking at the wrong part of the table. > This discussion is about DECIMAL operands. > what I wrote is corr

Re: PL/I integer arithmetic

2020-09-07 Thread Robin Vowels
You are looking at the wrong part of the table. This discussion is about DECIMAL operands. what I wrote is correct for such. See Table 15 top entry, for ANS rules for division; Table 16 top entry, for IBM rules. On 2020-09-07 22:19, Joe Monk wrote: Actually it does... Under the IBM suboption: