Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #33313 > unrolled thread

Re: Prefix and postfix

Started byKeith Thompson <kst-u@mib.org>
First post2015-12-07 11:46 -0800
Last post2015-12-15 22:13 +0100
Articles 3 — 3 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.


Contents

  Re: Prefix and postfix Keith Thompson <kst-u@mib.org> - 2015-12-07 11:46 -0800
    Re: Prefix and postfix glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-12-08 01:07 +0000
    Re: Prefix and postfix Jan Burse <janburse@fastmail.fm> - 2015-12-15 22:13 +0100

#33313 — Re: Prefix and postfix

FromKeith Thompson <kst-u@mib.org>
Date2015-12-07 11:46 -0800
SubjectRe: Prefix and postfix
Message-ID<lnr3iynisf.fsf@kst-u.example.com>
ram@zedat.fu-berlin.de (Stefan Ram) writes:
> glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:
>>For comparison purposes, Java has assignment expressions as
>>statements.
>
>   In Java, assignment expressions are not statements.

No, but as in C, adding a semicolon to an assignment expression makes
it a statement, specifically an ExpressionStatement.  (Unlike C,
Java doesn't permit adding a semicolon to *any* expression to form
a statement, but an assignment is one of the subset of expressions
that can be used in an ExpressionStatement.)

If you're going to quibble about punctuation in a forum that may
not be familiar with the language you're discussing, it would be
helpful to mention what you're doing.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

[toc] | [next] | [standalone]


#33314

Fromglen herrmannsfeldt <gah@ugcs.caltech.edu>
Date2015-12-08 01:07 +0000
Message-ID<n45agc$mc8$1@speranza.aioe.org>
In reply to#33313
In comp.lang.c Keith Thompson <kst-u@mib.org> wrote:
> ram@zedat.fu-berlin.de (Stefan Ram) writes:
>> glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:
>>>For comparison purposes, Java has assignment expressions as
>>>statements.

>>   In Java, assignment expressions are not statements.
 
> No, but as in C, adding a semicolon to an assignment expression makes
> it a statement, specifically an ExpressionStatement.  (Unlike C,
> Java doesn't permit adding a semicolon to *any* expression to form
> a statement, but an assignment is one of the subset of expressions
> that can be used in an ExpressionStatement.)

Is that what he meant?  No, I didn't figure that out.

I thought it had something to do with the way it was defined
in Java. 

Yes I know that in some languages semicolons are statement terminators
and in others separators, in the former thay are part of the statement,
in the latter they aren't.  (See the differnnce in IF statements in
Pascal and PL/I.)
 
> If you're going to quibble about punctuation in a forum that may
> not be familiar with the language you're discussing, it would be
> helpful to mention what you're doing.

Or even if they are, and just miss the point.

-- glen

[toc] | [prev] | [next] | [standalone]


#33351

FromJan Burse <janburse@fastmail.fm>
Date2015-12-15 22:13 +0100
Message-ID<n4pvqm$4ad$1@news.albasani.net>
In reply to#33313
Keith Thompson schrieb:
> ram@zedat.fu-berlin.de (Stefan Ram) writes:
>> glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:
>>> For comparison purposes, Java has assignment expressions as
>>> statements.
>>
>>    In Java, assignment expressions are not statements.
>
> No, but as in C, adding a semicolon to an assignment expression makes
> it a statement, specifically an ExpressionStatement.  (Unlike C,
> Java doesn't permit adding a semicolon to *any* expression to form
> a statement, but an assignment is one of the subset of expressions
> that can be used in an ExpressionStatement.)
>
> If you're going to quibble about punctuation in a forum that may
> not be familiar with the language you're discussing, it would be
> helpful to mention what you're doing.
>

Yep, see here:
https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-ExpressionStatement

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web