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 15:16:00


Let me try to say it again in another way:
the (sometimes considered destructive) power of the expressions a++
and ++a comes from the fact, that these expressions are EXPRESSIONs
and can be used in other expressions or assignments as side effects,
for example:

x = a++;

or

*t++ = *s++;

Now, if you don't want such "destructive power" in your language, you
have to define these constructs in a way, that they are not
expressions, that is, that they have no value. But then they are
simple shortcuts for other syntax we already have, for example:

a++;

as a replacement for

a += 1;

and I think, the PL/1 designers didn't want that "destructive power"
outlined above, and so they didn't see a reason for allowing a++; and
++a;

Kind regards

Bernd



> I'm naive.  What's a good reason (other than economy of language design)


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