Oppolzer - Informatik / Blog


Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie

IBM-MAIN - C-Features in PL/1 - Vor- und Nachteile

Subject:

Re: Compile COBOL Programs In 64 Bit.

From:

Bernd Oppolzer <bernd.oppolzer@T-ONLINE.DE>

Reply-To:

IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU>

Date:

2015.01.21 08:38:00


Am 21.01.2015 um 04:43 schrieb P.G.:
> On Wed, 21 Jan 2015 01:24:24 +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.
>

I'm simply telling facts ...

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?

BTW: variable ++; is not still possible in PL/1 for several good
reasons.

In fact, we have much more C programmers out there than PL/1
programmers, and such possibilities may make it easier for them to
accept PL/1 as a second (third, forth) language.

Kind regards

Bernd

Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie