On Dec 24, 2:40 am, John W Kennedy <jwke...@attglobal.neg> wrote:
What part of my statement "I think that that early IBM
documentation is not applicable" did you not understand?
> This is
was
> IBM's official description of the
> PL/I language, and, although it's decades out of date, it has never been
> revised.
>
> > In the case of the IBM compiler here, it looks like an
> > implementation restriction. I see no reason why SUBSTR
> > should return anything other than NONVARYING string
> > when the third argument is a constant.
>
> > It looks like the requirement of PICSPEC (insisting on a
> > fixed-length string) is likewise an implementation restriction, merely
> > to simplify code generation.
>
> That’s your explanation for everything,
You're talking nonsense, which is amply evident from your
next sentence.
> and, as usual, you’re off-base.
Don't make silly statements.
> In order for the first operand of PICSPEC to be VARYING, it is necessary for
> the second operand to be a run-time string variable,
Obviously you don't understand the meaning of VARYING.
The requirement is that both arguments are to be the same length.
> which could be sanely
> done only out-of-line, which in itself is trivial from a code-generation
> viewpoint, but which means in turn that the type, precision, and scale of
> the expression all become unknown at compile time, which opens the same
> rat's nest that assigning from CHARACTER to numeric did, only worse, since
> the CHARACTER case at least allowed of arbitrary defaults.
You have absolutely no idea what you are talking about.
> If you want a language that is interpreted at runtime, I suggest REXX in
> the IBM world, or Ruby elsewhere. PL/I is designed to be compiled.
(But it can also be interpreted.)
> >> Unfortunately, all modern PL/I documentation is vague, and all precise
> >> PL/I documentation has gone without revision since the 60s. A pity,
> >> seeing that PL/I was the first language to be decently documented, but
> >> there you are.
Some would say the honor of being the first
decently-documented language belongs to ALGOL.
> > I think that you will find that the Kednos PL/I documentation
> > is precise.
>
> No it isn’t. Indeed, on this particular issue, it’s flat wrong, seeing that
> the plain reading of it is that the result of SUBSTR is NONVARYING, which
> is absurd.
No it isn't. It's painfuly clear that you don't inderstand the
meaning of the attribute VARYING.
The KEDNOS documentation on SUBSTR is correct for KEDNOS.
The length of the string delivered by SUBSTR
is of one and only one length, regardless of how that
length is specified (as either constant or expression).
Thus that string is quite capable of being represented as
CHARACTER.
In point of fact, in general, SUBSTR could return either a
NONVARYING or VARYING string. The only difference is in the
way in which the string is represented in storage.
> If you want to see a precise language specification, look at the ULD, or at
> the Ada Language Reference. IBM's PL/I Language Reference manuals since
> 1970 fall somewhere between precise and "Mister Blobby's Fun with PL/I".- Hide quoted text -
Are you just having a bad day?