Re: REXX true/false (was Constant Identifiers)

2020-09-10 Thread Seymour J Metz
true/false (was Constant Identifiers) Yes. My post-grad thesis was on PL/I - and on its being originally called Fortran VI in 1962, then NPL in '64, then distributed as PL/I in '66 together with OS/360. I wrote PL/I before Clist/CLIST and long before REXX. Confused am I? On 09/09/2020 05:49

Re: REXX true/false (was Constant Identifiers)

2020-09-10 Thread Seymour J Metz
@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) Confused? Difficult to say--the brash nature of this debate is clouding things. There is an example above which uses something like ''0001'B to initialise a variable. In Rexx, that is not a boolean value. Depending on which

Re: REXX true/false (was Constant Identifiers)

2020-09-10 Thread Bob Bridges
I dunno, though, the first part of it was entertaining. And as I'm not a systems programmer (I came into mainframe security through the development door), many of the more on-topic threads here are opaque to me, so the occasional fight over COBOL or CLIST provides some diversion. --- Bob

Re: REXX true/false (was Constant Identifiers)

2020-09-10 Thread David Crayford
On 2020-09-10 8:05 PM, Rupert Reynolds wrote: Confused? Difficult to say--the brash nature of this debate is clouding things. Perfect example of bike shedding! A rambling thread where people argue over stuff that is not really useful! IBMMAIN is difficult to read these days. The good stuff

Re: REXX true/false (was Constant Identifiers)

2020-09-10 Thread Rupert Reynolds
Confused? Difficult to say--the brash nature of this debate is clouding things. There is an example above which uses something like ''0001'B to initialise a variable. In Rexx, that is not a boolean value. Depending on which interpreter you use, it is either a byte with contents x'01', which

Re: REXX true/false (was Constant Identifiers)

2020-09-09 Thread CM Poncelet
Sent: Tuesday, September 8, 2020 7:53 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: REXX true/false (was Constant Identifiers) > > Mr Bridges, > > 1) The reason the program does not abend is it has a "SIGNAL ON SYNTAX > NAME ERROR3" coded before the "IF TRUE THE

Re: REXX true/false (was Constant Identifiers)

2020-09-09 Thread Paul Gilmartin
On Wed, 9 Sep 2020 00:45:12 -0400, Phil Smith III wrote: >Y'all are dancing on the head of a pin. As Shmuel said, Rexx has one datatype, >period. It has the DATATYPE function that can do some >analysis on a variable's contents and tell you whether it's all numeric, hex, >etc. That's basically

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

2020-09-09 Thread Seymour J Metz
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 for > integers. > In integer ar

Re: PL/I expressions (was Constant Identifiers)

2020-09-09 Thread Robin Vowels
From: "Paul Gilmartin" <000433f07816-dmarc-requ...@listserv.ua.edu> Sent: Sunday, September 06, 2020 1:33 PM 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!

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 Division (was Constant Identifiers)

2020-09-09 Thread Seymour J Metz
To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: PL/I Division (was Constant Identifiers) From: "Joe Monk" Sent: Monday, September 07, 2020 1:05 PM > "No it isn't. 4/3 yields 1.33... to 15 digits, > and is of precision (15,14)" > > Depends on RULES(IBM) or RULES(ANS).

Re: PL/I integers: Constant Identifiers

2020-09-09 Thread Seymour J Metz
(Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of Robin Vowels Sent: Wednesday, September 9, 2020 10:24 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: PL/I integers: Constant Identifiers From: "Seymour J

Re: PL/I and decimal integers (was Constant Identifiers)

2020-09-09 Thread Robin Vowels
From: "Seymour J Metz" Sent: Monday, September 07, 2020 4:30 AM The default type for 3 and 4 is FIXED BINARY. Definitely NOT. 3 and 4 are decimal digits. PL/I does not have an integer type, It does. but the DIVIDE() BIF can be used to do an integer divide, and assigning a quotient to

Re: PL/I integers: Constant Identifiers

2020-09-09 Thread Robin Vowels
@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 ...

Re: PL/I Division (was Constant Identifiers)

2020-09-09 Thread Robin Vowels
From: "Joe Monk" Sent: Monday, September 07, 2020 1:05 PM "No it isn't. 4/3 yields 1.33... 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

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 D

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

2020-09-09 Thread Robin Vowels
33 1 6 */ As you can see, the results are the same under IBM and ANS rules. From: IBM Mainframe Discussion List on behalf of Robin Vowels Sent: Sunday, September 6, 2020 7:06 PM Subject: Re: Constant I

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread Seymour J Metz
Subject: Re: REXX true/false (was Constant Identifiers) Mr Bridges, 1) The reason the program does not abend is it has a "SIGNAL ON SYNTAX NAME ERROR3" coded before the "IF TRUE THEN...", which traps the abend and resumes execution at label ERROR3. 2) I disagree with Mr

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread Phil Smith III
Y'all are dancing on the head of a pin. As Shmuel said, Rexx has one datatype, period. It has the DATATYPE function that can do some analysis on a variable's contents and tell you whether it's all numeric, hex, etc. That's basically it. Arguing about whether it's a "string" or a "character

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread CM Poncelet
Don't bother. IBM will reply NAPWAD (not a problem, working as designed). ;-) On 08/09/2020 16:22, Paul Gilmartin wrote: > (cross-posting to IBM-Main and TSO-REXX) > On 2020-09-08, at 00:23:52, CM Poncelet wrote: >> A *character* string is either any string that has DATATYPE CHAR but not >>

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread CM Poncelet
Mr Bridges,   1) The reason the program does not abend is it has a "SIGNAL ON SYNTAX NAME ERROR3" coded before the "IF TRUE THEN...", which traps the abend and resumes execution at label ERROR3.   2) I disagree with Mr Metz on the grounds that he argues that "everything in REXX is a character

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread Seymour J Metz
; Sent: Tuesday, September 8, 2020 11:22 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) (cross-posting to IBM-Main and TSO-REXX) On 2020-09-08, at 00:23:52, CM Poncelet wrote: > > A *character* string is either any string that has DATATYPE CHAR but not &g

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread Bob Bridges
Mr Poncelet, I'm interested in this example. Two questions: 1) Once TRUE is set to a '1'b in the last two sections, why does the program not abend when it encounters "IF TRUE THEN..."? Seems to me REXX should complain that TRUE is not 1 or 0. 2) From your preceding posts I got the impression

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread Paul Gilmartin
(cross-posting to IBM-Main and TSO-REXX) On 2020-09-08, at 00:23:52, CM Poncelet wrote: > > A *character* string is either any string that has DATATYPE CHAR but not > DATATYPE NUM, or is *any* string (and it might as well then be called > 'anything string' instead of 'character string'). >

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread Seymour J Metz
tp://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of CM Poncelet Sent: Monday, September 7, 2020 10:33 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) You said, "It isn't boolean; everything in REXX i

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread CM Poncelet
A *character* string is either any string that has DATATYPE CHAR but not DATATYPE NUM, or is *any* string (and it might as well then be called 'anything string' instead of 'character string'). Q: "What's your motivation and the motivation of the recondite examples you supplied (which I

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread Paul Gilmartin
On Tue, 8 Sep 2020 03:33:18 +0100, CM Poncelet wrote: >You said, "It isn't boolean; everything in REXX is a character string." >� >I agree that "it's all strings", but not that "everything in REXX is a >*character* string." >� Persuing the Rexx Reference, SA32-0972-40, I find various

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread CM Poncelet
/~smetz3 > > > > From: IBM Mainframe Discussion List on behalf of > CM Poncelet > Sent: Monday, September 7, 2020 9:30 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: REXX true/false (was Constant Identifiers) > > No, REXX has both

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread Paul Gilmartin
On Tue, 8 Sep 2020 02:30:01 +0100, CM Poncelet wrote: > >My mistake was to think that setting a variable to a quoted value, in >REXX, made that variable a type CHAR. But REXX considers it to be NUM if >it contains only numerics, regardless of whether its set value was > Not only numerics. For

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread Seymour J Metz
It isn't boolean; everything in REXX is a character string. > > > -- > Shmuel (Seymour J.) Metz > http://mason.gmu.edu/~smetz3 > > > > From: IBM Mainframe Discussion List on behalf of > CM Poncelet > Sent: Monday, Septe

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread CM Poncelet
isn't boolean; everything in REXX is a character string. > > > -- > Shmuel (Seymour J.) Metz > http://mason.gmu.edu/~smetz3 > > > > From: IBM Mainframe Discussion List on behalf of > CM Poncelet > Sent: Monday, September 7, 2020 1

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread Seymour J Metz
, alas. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of Bob Bridges Sent: Monday, September 7, 2020 8:20 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread Bob Bridges
"Mehitabel" - wow! You're a lot older than I assumed, Mr Metz! --- Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313 /* In its state of nature [a dog] has a smell, and habits, which frustrate man's love; he washes it, house-trains it, teaches it not to steal, and is so enabled to love it

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread Paul Gilmartin
On Mon, 7 Sep 2020 18:52:55 +, Seymour J Metz wrote: >Hindsight? I never understood the purpose of the web, given that gopher and >SGML were already here. All we were missing was a protocol called Mehitabel ;-) > It's easy to understand. Just remember, you're not the customer; you're the

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread Seymour J Metz
on behalf of Rupert Reynolds Sent: Sunday, September 6, 2020 5:09 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) Hindsight is a wonderful thing :-) On Sun, 6 Sep 2020 at 21:55, Seymour J Metz wrote: > You didn't read The World According to A

Re: Constant Identifiers

2020-09-07 Thread Paul Gilmartin
On Tue, 8 Sep 2020 01:04:43 +1000, Greg Price wrote: >On 2020-09-05 3:01 AM, Paul Gilmartin wrote: > >... A few years back there seemed to be a >religious phase where IBM ID went on a crusade to remove weasel words >from documentation. >... >As it was, whole sections of text I wrote for

Re: PL/I integers (was: Constant Identifiers)

2020-09-07 Thread Seymour J Metz
.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of Bob Bridges Sent: Monday, September 7, 2020 10:48 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: PL/I integers (was: Constant Identifiers) All of this is really fascinating

Re: Constant Identifiers

2020-09-07 Thread Seymour J Metz
From: IBM Mainframe Discussion List on behalf of Greg Price Sent: Monday, September 7, 2020 11:04 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Constant Identifiers On 2020-09-05 3:01 AM, Paul Gilmartin wrote: > If the number 3.1416 is used in more than one pl

Re: Constant Identifiers

2020-09-07 Thread Greg Price
On 2020-09-05 3:01 AM, Paul Gilmartin wrote: If the number 3.1416 is used in more than one place in the program, or if it requires specific data or precision attributes, you must declare it as a named constant. In the olden days - years before the iPhone 6 was a thing - there

Re: PL/I integers (was: Constant Identifiers)

2020-09-07 Thread Bob Bridges
All of this is really fascinating (and no, I'm not being facetious): A bunch of apparently knowledgeable PL/1 programmers cannot agree on a point that would seem to have a single indisputable answer. Rather than keep on saying "yes it is" / "no it isn't", couldn't one or two of you from both

Re: PL/I integers (was: Constant Identifiers)

2020-09-07 Thread Joe Monk
ssion List on behalf > of Robin Vowels > Sent: Monday, September 7, 2020 5:49 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: PL/I integers (was: Constant Identifiers) > > On 2020-09-07 16:13, Seymour J Metz wrote: > > PL/I has never had integers. > > You are still wrong.

Re: PL/I integers (was: Constant Identifiers)

2020-09-07 Thread Seymour J Metz
Discussion List on behalf of Robin Vowels Sent: Monday, September 7, 2020 5:49 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: PL/I integers (was: Constant Identifiers) On 2020-09-07 16:13, Seymour J Metz wrote: > PL/I has never had integers. You are still wrong. Recently you have made numer

Re: Constant Identifiers

2020-09-07 Thread Seymour J Metz
://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of Joe Monk Sent: Monday, September 7, 2020 8:04 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Constant Identifiers "No, FIXED BIN(15,0) is not an integer, and the precision rule

Re: Constant Identifiers

2020-09-07 Thread Joe Monk
Actually it does... Under the IBM suboption: - Nonzero scale factors are permitted in FIXED BIN declarations. - If the result of any precision-handling built-in function (ADD, BINARY, and so on) has FIXED BIN attributes, the specified or implied scale factor can be nonzero. Under

Re: Constant Identifiers

2020-09-07 Thread Joe Monk
Fortran mindset. > > > -- > Shmuel (Seymour J.) Metz > http://mason.gmu.edu/~smetz3 > > > > From: IBM Mainframe Discussion List on behalf > of Joe Monk > Sent: Sunday, September 6, 2020 7:35 PM > To: IBM-MAIN@LISTSERV.UA.EDU &

Re: PL/I integers (was: Constant Identifiers)

2020-09-07 Thread Robin Vowels
result in PL/I, namely, 6: DECLARE (I, J) FIXED DECIMAL (15); I = 4; J = 3; PUT (I/J); will print 6 From: IBM Mainframe Discussion List on behalf of Robin Vowels Sent: Sunday, September 6, 2020 7:06 PM Subject: Re: Constant Identifiers - Original

Re: Constant Identifiers

2020-09-07 Thread Seymour J Metz
: IBM Mainframe Discussion List on behalf of Robin Vowels Sent: Sunday, September 6, 2020 7:06 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Constant Identifiers - Original Message - From: "Seymour J Metz" To: Sent: Monday, September 07, 2020 5:33 AM > PL/I doesn't have in

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread Seymour J Metz
on behalf of CM Poncelet Sent: Monday, September 7, 2020 1:23 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) ARG DEBUG IF DEBUG = 'DEBUG' THEN , TRACE I TRUE = (1-1=0 & 4¬=6) TVAL = '0011'||X2B(D2X(TRUE)) SAY 'TRUE = 'TRUE SAY 'TVAL = 'TVAL IF TRUE THEN

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
Subject: Re: REXX true/false (was Constant Identifiers) "ELSE IF ¬TRUE THEN " was just to demonstrate that "TRUE" is Boolean. On 07/09/2020 05:24, Seymour J Metz wrote: > First, that code is highly obfuscated. Why would you ever want to write "IF > foo & TR

Re: PL/I division (was: Constant Identifiers)

2020-09-06 Thread Seymour J Metz
(was: Constant Identifiers) On 2020-09-07 14:56, Seymour J Metz wrote: > No: see > https://www.ibm.com/support/knowledgecenter/SSY2V3_5.3.0 > /lr/resarithoprt.html#resarithoprt__fig16, > Tables 3 and 4. For 4/3, the scale factor is 1, not 0. 4 is FIXED DECIMAL (1,0). 3 IS fixed decimal (1,0).

Re: PL/I declarations (was: Constant Identifiers)

2020-09-06 Thread Seymour J Metz
List on behalf of Robin Vowels 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

Re: Constant Identifiers

2020-09-06 Thread Seymour J Metz
:58 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Constant Identifiers From: "Paul Gilmartin" <000433f07816-dmarc-requ...@listserv.ua.edu> To: Sent: Sunday, September 06, 2020 1:33 PM On Sat, 5 Sep 2020 08:13:42 +1000, Robin Vowels wrote: > >As for writing formulas, I p

Re: PL/I declarations (was: Constant Identifiers)

2020-09-06 Thread Robin Vowels
BINARY(15,0) are both attributes describing a whole number, that is, an integer. From: IBM Mainframe Discussion List on behalf of Joe Monk Sent: Sunday, September 6, 2020 7:35 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Constant Identifiers "PL/I do

Re: PL/I division (was: Constant Identifiers)

2020-09-06 Thread Robin Vowels
Table 16. It's been that way since 1965. * given that the maximum precision is 15. From: IBM Mainframe Discussion List on behalf of Robin Vowels Sent: Sunday, September 6, 2020 8:09 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Constant

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread CM Poncelet
M Mainframe Discussion List on behalf of > CM Poncelet > Sent: Sunday, September 6, 2020 9:31 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: REXX true/false (was Constant Identifiers) > > In the following example, > TRUE = (1 - 1 = 0 & 1 ¬= 0) [or whatever is more app

Re: Constant Identifiers

2020-09-06 Thread Robin Vowels
On 2020-09-07 13:05, Joe Monk wrote: "No it isn't. 4/3 yields 1.33... 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. It doesn't depend on whether IBM rules or ANS rules are in force. What I said it

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread CM Poncelet
ARG DEBUG IF DEBUG = 'DEBUG' THEN ,   TRACE I TRUE = (1-1=0 & 4¬=6) TVAL = '0011'||X2B(D2X(TRUE)) SAY 'TRUE = 'TRUE SAY 'TVAL = 'TVAL IF TRUE THEN SAY 'TRUE' IF TVAL THEN SAY 'TVAL' IF ¬TRUE THEN SAY 'NOT TRUE' IF ¬TVAL THEN SAY 'NOT TVAL' EXIT 0   gives (in ASCII):   TRUE = 1 TVAL = 00110001 TRUE

Re: Constant Identifiers

2020-09-06 Thread Seymour J Metz
, 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, it

Re: Constant Identifiers

2020-09-06 Thread Seymour J Metz
PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Constant Identifiers From: "Paul Gilmartin" <000433f07816-dmarc-requ...@listserv.ua.edu> To: Sent: Sunday, September 06, 2020 1:33 PM On Sat, 5 Sep 2020 08:13:42 +1000, Robin Vowels wrote: > >As for writing formulas, I p

Re: Constant Identifiers

2020-09-06 Thread Seymour J Metz
List on behalf of Robin Vowels Sent: Sunday, September 6, 2020 8:09 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Constant Identifiers - Original Message - From: "Paul Gilmartin" <000433f07816-dmarc-requ...@listserv.ua.edu> Sent: Sunday, September 06, 2020 11:07 PM On

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of CM Poncelet Sent: Sunday, September 6, 2020 9:31 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) In the following example, TRUE =

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Bob Bridges
Because I wasn't paying attention, I guess. Maybe I did do it that way in the past, but just now the below is what I remembered. Absent of me. --- Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313 /* God's never been disappointed in me, because he never had any illusions about me. -Clay

Re: Constant Identifiers

2020-09-06 Thread Joe Monk
"No it isn't. 4/3 yields 1.33... 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. Joe On Sun, Sep 6, 2020 at 7:34 PM Robin

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Paul Gilmartin
On Mon, 7 Sep 2020 02:31:33 +0100, CM Poncelet wrote: >In the following example, >TRUE = (1 - 1 = 0 & 1 ¬= 0) [or whatever is more appropriate], >it is then sufficient e.g. to code: >IF 4 ¬= 6 & TRUE THEN >ELSE IF ¬TRUE THEN >  >I.e. TRUE can be defined as a Boolean '1'b in REXX, as per above.

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread CM Poncelet
In the following example, TRUE = (1 - 1 = 0 & 1 ¬= 0) [or whatever is more appropriate], it is then sufficient e.g. to code: IF 4 ¬= 6 & TRUE THEN ELSE IF ¬TRUE THEN   I.e. TRUE can be defined as a Boolean '1'b in REXX, as per above. On 06/09/2020 20:43, Paul Gilmartin wrote: > On Sun, 6 Sep

Re: Constant Identifiers

2020-09-06 Thread Robin Vowels
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.33... to 15

Re: Constant Identifiers

2020-09-06 Thread Robin Vowels
From: "Bob Bridges" Sent: Monday, September 07, 2020 8:29 AM To tell you the truth, I haven't written for a compiler in long enough that I don't have any idea which ones do what. I wouldn't trust REXX, CLIST or VBA to do it; I try to assume the worst, and make such things explicit. Actually

Re: Constant Identifiers

2020-09-06 Thread Robin Vowels
From: "Robert Prins" Sent: Monday, September 07, 2020 3:42 AM On 2020-09-06 13:07, Paul Gilmartin wrote: On Sun, 6 Sep 2020 17:25:45 +1000, Robin Vowels wrote: Beware! Than might left-associate as: volume = ( 4/3 ) * 3.14159 * radius**3 ... and the quotient of integers, 4/3, is 1.

Re: Constant Identifiers

2020-09-06 Thread Robin Vowels
- Original Message - From: "Paul Gilmartin" <000433f07816-dmarc-requ...@listserv.ua.edu> Sent: Sunday, September 06, 2020 11:07 PM On Sun, 6 Sep 2020 17:25:45 +1000, Robin Vowels wrote: And C: 662 $ cat typetest.c #include int main() { printf( "%10.6f\n", 4/3 * 3.14159 );

Re: Constant Identifiers

2020-09-06 Thread Robin Vowels
From: "Paul Gilmartin" <000433f07816-dmarc-requ...@listserv.ua.edu> To: Sent: Sunday, September 06, 2020 1:33 PM 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!

Re: Constant Identifiers

2020-09-06 Thread Joe Monk
half > of Paul Gilmartin <000433f07816-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 writi

Re: Constant Identifiers

2020-09-06 Thread Robin Vowels
- Original Message - From: "Seymour J Metz" To: Sent: Monday, September 07, 2020 5:33 AM PL/I doesn't have integers. PL/I has always had integers. The ratiio 4/3 is FIXED BIN, No it not. It is FIXED DECIMAL -- as I said a few days ago. And it hasn't changed since. with some

Re: Constant Identifiers

2020-09-06 Thread Robin Vowels
"Seymour J Metz" wrote in message news:bl0pr05mb5156591ed17d7bddfaee695299...@bl0pr05mb5156.namprd05.prod.outlook.com... The default type for 3 and 4 is FIXED BINARY. No it's not. Constants have the type and precision of the constant. Thus, 3 and 4 are both FIXED DECIMAL (1) > PL/I does not

Re: Constant Identifiers

2020-09-06 Thread Seymour J Metz
: Sunday, September 6, 2020 6:29 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Constant Identifiers To tell you the truth, I haven't written for a compiler in long enough that I don't have any idea which ones do what. I wouldn't trust REXX, CLIST or VBA to do it; I try to assume the worst, and make

Re: Constant Identifiers

2020-09-06 Thread Bob Bridges
To tell you the truth, I haven't written for a compiler in long enough that I don't have any idea which ones do what. I wouldn't trust REXX, CLIST or VBA to do it; I try to assume the worst, and make such things explicit. Actually I might not trust a compiler to do it, either, even if I knew

Re: Constant Identifiers

2020-09-06 Thread Bob Bridges
Ah, that makes more sense than my first guess. --- Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313 /* Logic is an organized way of going wrong with confidence. -Kettering's Law, quoted in _The Number of the Beast_ by Robert A Heinlein. */ -Original Message- From: IBM Mainframe

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Rupert Reynolds
mason.gmu.edu/~smetz3 > > > > From: IBM Mainframe Discussion List on behalf > of Rupert Reynolds > Sent: Sunday, September 6, 2020 4:48 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: REXX true/false (was Constant Identifiers) > > Loss of Internet access would have

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
4:48 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) Loss of Internet access would have been sheer luxury! (insert The Four Yorkshiremen sketch here) as this was the 1980s :-) The Internet was there, but nobody had heard of it unless he was the sort of geek

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Rupert Reynolds
Loss of Internet access would have been sheer luxury! (insert The Four Yorkshiremen sketch here) as this was the 1980s :-) The Internet was there, but nobody had heard of it unless he was the sort of geek who soldered his own modem cable, and WWW was probably not even a twinkle in timbl's eye

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
of Rupert Reynolds Sent: Sunday, September 6, 2020 3:45 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) It almost boils down to a matter of style, I suppose. The only thing against that is that I had no access to any sort of docs, as I said. I had no way of knowing

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Rupert Reynolds
ISTSERV.UA.EDU > Subject: Re: REXX true/false (was Constant Identifiers) > > I don't see any advantage in 'Y', because then you have to code IF or WHEN > variable = 'Y'. > > The advantage of Boolean is clarity in something like:- > /* Rexx */ > TRUE = (1=1) > ... > SEL

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Paul Gilmartin
On Sun, 6 Sep 2020 12:03:18 -0400, scott Ford wrote: >I have done things like true =‘Y’ and then > >If true > .. >end > What language? That would certainly be a syntax error in Rexx. And why? You could just omit the "if true" and code: do .. end n Sun, 6 Sep

Re: Constant Identifiers

2020-09-06 Thread Seymour J Metz
arc-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

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) To expand, I had some code monitoring input data as it arrived, waiting for a fault condition that was in several parts, order unknown. So I used a few Rexx variables as Booleans, as they made the conditional code shorter

Re: Constant Identifiers

2020-09-06 Thread Seymour J Metz
://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of Paul Gilmartin <000433f07816-dmarc-requ...@listserv.ua.edu> Sent: Sunday, September 6, 2020 9:07 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Constant Identifiers On Sun, 6 Sep 2020

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) I have done things like true =‘Y’ and then If true .. end Scott On Sun, Sep 6, 2020 at 8:11 AM Rupert Reynolds wrote: > To expand, I had some code monitoring input data as it arrived, waiting for > >

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
Subject: Re: REXX true/false (was Constant Identifiers) I don't see any advantage in 'Y', because then you have to code IF or WHEN variable = 'Y'. The advantage of Boolean is clarity in something like:- /* Rexx */ TRUE = (1=1) ... SELECT WHEN logmode = "D4A32782" & (GotASCII & Got

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Rupert Reynolds
I don't see any advantage in 'Y', because then you have to code IF or WHEN variable = 'Y'. The advantage of Boolean is clarity in something like:- /* Rexx */ TRUE = (1=1) ... SELECT WHEN logmode = "D4A32782" & (GotASCII & GotVBMrecord) THEN do (from a similar exec I found in archives, not the

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread scott Ford
I have done things like true =‘Y’ and then If true .. end Scott On Sun, Sep 6, 2020 at 8:11 AM Rupert Reynolds wrote: > To expand, I had some code monitoring input data as it arrived, waiting for > > a fault condition that was in several parts, order unknown. > > > > So I used a few

Re: Constant Identifiers

2020-09-06 Thread Robert Prins
On 2020-09-06 13:07, Paul Gilmartin wrote: On Sun, 6 Sep 2020 17:25:45 +1000, Robin Vowels wrote: Beware! Than might left-associate as: volume = ( 4/3 ) * 3.14159 * radius**3 ... and the quotient of integers, 4/3, is 1. No it's not. 4/3 yields 1.33.. to 15 digits in PL/I.

Re: Constant Identifiers

2020-09-06 Thread Rupert Reynolds
As I remember PL/1 from the 1980s (and very definitely pre-LE) the rules for implicit conversions were well-defined, but needed care. Simply adding parentheses would allow me to control the use of integer operations. I'll be watching for more recent (relevant) exerience :-) Rupert On Sun., Sep.

Re: Constant Identifiers

2020-09-06 Thread Paul Gilmartin
On Sun, 6 Sep 2020 17:25:45 +1000, Robin Vowels wrote: >>> >> Beware! Than might left-associate as: >> volume = ( 4/3 ) * 3.14159 * radius**3 >> ... and the quotient of integers, 4/3, is 1. > >No it's not. 4/3 yields 1.33.. to 15 digits in PL/I. >You're thinking of FORTRAN. > And

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Rupert Reynolds
To expand, I had some code monitoring input data as it arrived, waiting for a fault condition that was in several parts, order unknown. So I used a few Rexx variables as Booleans, as they made the conditional code shorter and clearer. But someone will reuse my code another day (perhaps me), and

Re: Constant Identifiers

2020-09-06 Thread Robin Vowels
On 2020-09-06 13:33, Paul Gilmartin wrote: 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

Re: Constant Identifiers

2020-09-05 Thread Paul Gilmartin
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.

Re: Constant Identifiers

2020-09-05 Thread Robin Vowels
to floating-point). - Original Message - From: "Bob Bridges" Newsgroups: bit.listserv.ibm-main To: Sent: Sunday, September 06, 2020 6:18 AM Subject: Re: Constant Identifiers When you care about efficiency, I'd think this would be better: const=4/3*3.14159E0 /* in the init

Re: REXX true/false (was Constant Identifiers)

2020-09-05 Thread Robin Vowels
On 2020-09-06 11:50, Seymour J Metz wrote: Eschew obfuscation. Either just use 0 and one, or write false=0;true=1. Similarly, for PL/I either just use '0'b and '1'b or write false='0'b;true='1'b;. VALUE is a good alternative also.

Re: Constant Identifiers

2020-09-05 Thread Seymour J Metz
: Friday, September 4, 2020 9:04 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Constant Identifiers "Seymour J Metz" wrote in message news:bl0pr05mb5156e311e88735a8afbef5ca99...@bl0pr05mb5156.namprd05.prod.outlook.com... > If you don't care about maintainable code than should is to strong.

Re: REXX true/false (was Constant Identifiers)

2020-09-05 Thread Seymour J Metz
on behalf of Bob Bridges Sent: Saturday, September 5, 2020 4:09 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: REXX true/false (was Constant Identifiers) I've never done that, but I have done something like it: str=word('true false',(0-fx)+2) ...where fx is Boolean. I hope I've done it only

Re: Constant Identifiers

2020-09-05 Thread Seymour J Metz
: Re: Constant Identifiers When you care about efficiency, I'd think this would be better: const=4/3*3.14159E0 /* in the initialization */ volume=const*radius**3 /* inside the loop */ --- Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313 /* Things may come to those who wait, but only

  1   2   >