On Tue, July 30, 2013 17:03, Timothy Groves wrote: > FPC offers the +=, -=, etc., statements swiped from C. Is there any > reason why ++ and -- are not similarly supported? I know that we have > inc() and dec(), but I'd say that ++ and -- are easier to type.
General side note with no intention to start discussion about superiority of one language to another: A lot of C constructs is easier to type than their Pascal equivalents but not necessarily even equally easy to read. Now specifically to your question - I believe that one of the reasons may be the fact that Pascal does not support unary arithmetic operators in postfix notation. The fact that C allows using them with both prefix and postfix notation makes them even more difficult from my point of view because potentially allowing them only in one of the notations known from other languages would immediately trigger users to ask why only one of possible notations (common elsewhere) is supported and the other not. Tomas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal