>> The assignment a += 5;
>> in C is an expression, too (and may be assigned to other variables
>> and used, whereever expressions are allowed in C).
>>
>> But it is no problem to take this kind of syntax over to PL/1,
>> WITHOUT assigning a value to the assignment A += 5;
>> (that is: without violating the language).
>>
> Has PL/I no operators which modify their operands?
I don't think so; if you leave aside function calls etc, then in an
assigment I think only the variables of the left side change; never
anything from the right side (of course, if the variables of the left
side don't appear on the right side, too).
There are not many operators in PL/1, BTW ... compared to C, for
example. We have three logical operators, but in C, there are bit
operators, too, and shift operators etc., and (I guess) 15 levels of
operator precedence. In PL/1, three or four ??
But anyway: C is a very small language, and you do best, if you don't
play around with those strange operator properties. I use parantheses,
whenever I'm not sure about the operator precedence. And: I use the
side effects of a++ etc. very carefully. Readability and
maintainability (does that word exist?) of the code is a very
important goal.
The power of PL/1 doesn't rely on many operators, but on other
concepts of the language.
Kind regards
Bernd
|