Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #35571 > unrolled thread
| Started by | Roedy Green <inquiry@mindprod.com> |
|---|---|
| First post | 2016-09-08 07:13 -0700 |
| Last post | 2016-09-08 15:04 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.java.programmer
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Operators Roedy Green <inquiry@mindprod.com> - 2016-09-08 07:13 -0700
Re: Operators Martin Gregorie <martin@address-in-sig.invalid> - 2016-09-08 15:04 +0000
| From | Roedy Green <inquiry@mindprod.com> |
|---|---|
| Date | 2016-09-08 07:13 -0700 |
| Subject | Re: Operators |
| Message-ID | <3as2tbd4l409tvfjl9pltu8u4qvtgqg7vu@4ax.com> |
On 8 Sep 2016 00:45:16 GMT, ram@zedat.fu-berlin.de (Stefan Ram) wrote: > Does this mean that »a?b:c« contains /two/ > operators, but »(int)3.2«, »(3)« and »f(x)« > do not contain an operator? I am not a language lawyer. I would say ( is not an operator because it does not order any particular computation. From a parsing point of view ? and : are separate operators. From a syntactic point of view there is a single operator with 3 operands. Precise vocabulary is not one of Java's strong points.
[toc] | [next] | [standalone]
| From | Martin Gregorie <martin@address-in-sig.invalid> |
|---|---|
| Date | 2016-09-08 15:04 +0000 |
| Message-ID | <nqrumq$qt3$1@dont-email.me> |
| In reply to | #35571 |
On Thu, 08 Sep 2016 07:13:27 -0700, Roedy Green wrote: > On 8 Sep 2016 00:45:16 GMT, ram@zedat.fu-berlin.de (Stefan Ram) wrote: > >> Does this mean that »a?b:c« contains /two/ operators, but »(int)3.2«, >> »(3)« and »f(x)« >> do not contain an operator? > I am not a language lawyer. > > I would say ( is not an operator because it does not order any > particular computation. > > From a parsing point of view ? and : are separate operators. From a > syntactic point of view there is a single operator with 3 operands. > > Precise vocabulary is not one of Java's strong points. Agreed: I've often seen '?' referred to as a 'ternary operator', i.e. its a single operator which takes three operands, just as '++' is a unary operator which takes a single operand and '+' is a binary operator which takes two operands. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web