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


Groups > comp.lang.java.programmer > #38639

Re: What is a "primary expression"?

Path csiph.com!feeder.erje.net!1.eu.feeder.erje.net!news2.arglkargh.de!news.albasani.net!.POSTED!not-for-mail
From Martin Gregorie <martin@mydomain.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: What is a "primary expression"?
Date Sun, 7 Oct 2018 18:02:45 +0000 (UTC)
Organization albasani.net
Lines 27
Message-ID <ppdho5$7hc$1@news.albasani.net> (permalink)
References <primary-20181007171511@ram.dialup.fu-berlin.de>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Trace news.albasani.net fpEpVdlcEMXEZbkFSNQIcl8HlsMxw/XhlPsDngKwYLgX0mf7slhYf42OUgn3tWAH9k+9CuRAfxVs3FVtVO5CyA==
NNTP-Posting-Date Sun, 7 Oct 2018 18:02:45 +0000 (UTC)
Injection-Info news.albasani.net; logging-data="scHT4J4BErTbSRZJhbF/W6Hl7pm/ApnC+gdxAXarNC25Yk7k+P8QxTiT1yFpUwm0fh6EzHtVz/gPuN1V9fqJZbzgLvW+bnUDfPp8xLd0hoVnXiWraI3tOS8r+hoBs4ZQ"; mail-complaints-to="abuse@albasani.net"
User-Agent Pan/0.145 (Duplicitous mercenary valetism; d7e168a git.gnome.org/pan2)
Cancel-Lock sha1:mVgDwQE3WCJ/pn81hxJFPUv+938=
Xref csiph.com comp.lang.java.programmer:38639

Show key headers only | View raw


On Sun, 07 Oct 2018 16:24:09 +0000, Stefan Ram wrote:

> What is a "primary expression"?
> 
This seems to be a fairly clear definition from 
http://web.deu.edu.tr/doc/oreily/java/langref/ch04_js.htm

    Primary expressions are constructs that fetch or create values, but
    do not directly perform computations on them

So, I think that this is also a primary expression:

    public float almostPi() { return 22.0/7.0 }

At least, some other languages than Java think would accept it as one, 
and possibly would accept this too:

r.nextDouble();

where R was declared as: Random r = new Random(); 

Both my examples match the definition I quoted.


-- 
Martin    | martin at
Gregorie  | gregorie dot org

Back to comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread


Thread

Re: What is a "primary expression"? Martin Gregorie <martin@mydomain.invalid> - 2018-10-07 18:02 +0000

csiph-web