On Wed, 21 Jan 2015 08:38:38 +0100, Bernd Oppolzer wrote:
>
>>> PL/1 today also allows simple pointer arithmetic, and even with a C-like
>>> syntax (if you want):
>>>
>>> DCL P PTR;
>>>
>>> P = ADDR (X);
>>> P += 5;
>>>
>>> /* now P contains the ADDR of X plus 5 */
>>>
>>> but unlike C, pointers in PL/1 have no type, so in this case, you get simple
>>> address arithmetic.
>>>
>> I shall scarcely be surprised if an ardent PL/I partisan on this list touts 
>> that
>> as a merit of PL/I.
>> ...
>
>It was the decision of the PL/1 language designers to make
>the language more user friendly to the C community. You don't have to
>use such language elements, if you don't like it. I see it this way:
>PL/1 is such a powerful language, that it even allows different
>programming styles. Or: why not allow language constructs, as long
>as it is clear to the programmer, what the new language element does
>and as long as the spirit of the language is not broken?
> 
Are you saying that as an accommodation to C programmers PL/I
has recently provided pointers with types, with increments by element
size?

>BTW: variable ++; is not still possible in PL/1 for several good reasons.
> 
I'm naive.  What's a good reason (other than economy of language design)
for not providing "variable ++"?  (And what of "++ variable"?)  One
possibility might be lexical ambiguity.

-- gill

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