But if it quacks like a hippopotamus than it is not a duck. FIXED BIN(fo0,0) 
and FIXED DEC(foo,0) do not quack like an integer.

Would you call 3.0E0 an integer?


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


________________________________________
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of 
Robin Vowels <robi...@dodo.com.au>
Sent: Monday, September 7, 2020 1:41 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: PL/I declarations (was: Constant Identifiers)

On 2020-09-07 15:15, Seymour J Metz wrote:
> No, FIXED BIN(15,0) is not an integer, and the precision rules can be
> very annoying to those with a Fortran mindset.

If it looks like a duck and quacks like a duck, it probably is a duck.

An integer is a whole number.
FIXED BINARY (15) and FIXED BINARY(15,0)
are both attributes describing a whole number,
that is, an integer.

> ________________________________________
> From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on
> behalf of Joe Monk <joemon...@gmail.com>
> Sent: Sunday, September 6, 2020 7:35 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Constant Identifiers
>
> "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)...
>
> Joe
>
> On Sun, Sep 6, 2020 at 2:33 PM Seymour J Metz <sme...@gmu.edu> wrote:
>
>> PL/I doesn't have integers. The ratiio 4/3 is FIXED BIN, with some
>> number
>> of bits after the binary point.
>>
>>
>> --
>> Shmuel (Seymour J.) Metz
>> http://mason.gmu.edu/~smetz3
>>
>>
>> ________________________________________
>> From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on
>> behalf
>> of Paul Gilmartin <0000000433f07816-dmarc-requ...@listserv.ua.edu>
>> Sent: Saturday, September 5, 2020 11:33 PM
>> To: IBM-MAIN@LISTSERV.UA.EDU
>> Subject: Re: Constant Identifiers
>>
>> On Sat, 5 Sep 2020 08:13:42 +1000, Robin Vowels wrote:
>> >
>> >As for writing formulas, I prefer to follow a well-known formula, thus:
>> >
>> >volume = 4/3 * 3.14159 * radius**3
>> >
>> Beware!  Than might left-associate as:
>>     volume = ( 4/3 ) * 3.14159 * radius**3
>> ... and the quotient of integers, 4/3, is 1.
>>
>> >However, if I'm interested in efficiency, I'd prefer
>> >
>> >volume = 4 * 3.14159E0 / 3 * radius**3
>> >
>> ... (and correct.)
>>
>> -- gil

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

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