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
@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
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
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
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
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
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
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
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!
, 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.
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).
(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
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
@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
...
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
- 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
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
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
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
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
>>
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
;
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
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
(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').
>
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
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
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
/~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
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
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
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
,
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
"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
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
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
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
.) 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
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
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
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
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.
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
://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
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
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
&
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
: 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
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
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
(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).
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
: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
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
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
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
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
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
, 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
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
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
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 =
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
"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
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.
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
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
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
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.
- 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 );
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!
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
- 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
"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
: 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
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
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
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
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
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
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
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
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
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
@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
://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
@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
>
>
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
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
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
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.
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.
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
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
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
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.
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
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.
: 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.
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
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 - 100 of 131 matches
Mail list logo