[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnubol: Re: [GNU-COBOL] GNUBOL refmod, OFIN and transparencies
In a message dated 11/1/99 3:33:14 AM EST,
Randall Bart, Barticus@att.net, had interacted with a previous post which had
asked :
>subscript
> : (ident ( qualifier )* { (PLUS|MINUS) integer } | integer)
>
>And one further note, a question really. Do you define 'integer' as
positive
>or unsigned? It cannot be unary negative.
Randall wrote
<<
According to the draft, p 32, 5.1.3 Operands: "The term 'integer' in a
general format refers to an unsigned non-zero integer numeric literal."
>>
Conformance with the standard is certainly good enough. The issue I am seeing
is that a
mainframe compiler can tolerate a unary plus integer. The documentation does
not seem to
present this as an extension. Some of these points are certainly very
refined considerations.
But seems like we might want to be able to do things like accept
...(ref +/- + + + ..... + integer)
but not
...(ref +/- - - - ..... - integer)
if that is yet allowable within the standard. The examples are extreme to try
to clarify the
recursive aspect of unary operators.
The problem is that although (ref + + integer) is a little sloppy maybe, the
otherwise portable
code might have some amount of this. My experience leads me to believe that
some programmers are REALLY habituated to puting plus signs on literals. The
big time vendors like to placate them. So if we just had the standard. It
would be one thing, but what we have is a large body of code, that is more or
less just fine, but kind of emphatic about postitivity.
Actually this is a worthwhile subject in generalize. I have seen much code
that has meaningless plus signs peppered all over the place. SO it is not
just a subscript incrementor problem. Value clauses on _unsigned_ data items
for example with +nnn.
But more so in the procedure divisions, one or more programmers start the
thing off, and then
all new programmers think it is required by the standard or the shop
conventions.
So, my suggestion is that we tolerate +integer-literal as an integer-literal,
where the standard calls for unsigned integer-literal, unless we comprehend
that the standard
is proscribing (outlawing) the unary operation. If it is clearly 'wrong''
then we have to decide
which ones we might subject to parametric liberation in order to garner
comitment from code
owners who had a different kind of compiler. All the while these situation
mostly need an explicit squash of unary minus, from the get-go, without
parametric alleviation.
Best Wishes
Bob Rayhawk
RKRayhawk@aol.com
--
This message was sent through the gnu-cobol mailing list. To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body. For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.