Anonymous user
Overloaded operators: Difference between revisions
m
→{{header|REXX}}: updated the output.
(→{{header|REXX}}: added the computer programming language REXX.) |
m (→{{header|REXX}}: updated the output.) |
||
Line 219:
The REXX language has the "normal" (as say, compared with PL/I) overloading of:
* the
* the multiplication operator (<big>'''*'''</big>) is "shared" with the exponentiation operator (<big>'''**'''</big>),
* the "or" operator (<big>'''|'''</big>) is "shared" with the concatenation operator (<big>'''||'''</big>),
Line 226:
<br>Note that some REXXes may also have other characters (glyphs) for the negation operator (not) such as: <big>^</big> and/or <big>¬</big> glyphs.
<lang rexx>/*REXX pgm shows
say '──positive
say +5 /* positive
say + 5 /* positive
say ++6 /* positive
say ++ 6 /* positive
say +++7 /* positive
say +++ 7 /* positive
say + + + + 8 /* positive
say + (9) /* positive
say '──negative
say -1 /* negative
say - 1 /* negative
say --2 /* negative
say -- 2 /* negative
say ---3 /* negative
say --- 3 /* negative
say - - - - 4 /* negative
say - (9) /* negative
say '───addition───'
Line 355:
{{out|output|text= when using the internal default input:}}
<pre>
──positive
5
5
Line 364:
8
9
──negative
-1
-1
|