Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #27409
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2014-01-27 12:04 -0800 |
| References | <assignment-principle-20140126210852@ram.dialup.fu-berlin.de> <lc4243$fqg$1@dont-email.me> |
| Message-ID | <e606479e-df8b-4a48-a4ae-8eb24fbdff71@googlegroups.com> (permalink) |
| Subject | Re: The Assignment Principle |
| From | FredK <fred.l.kleinschmidt@gmail.com> |
On Sunday, January 26, 2014 2:27:13 PM UTC-8, markspace wrote: > On 1/26/2014 12:17 PM, Stefan Ram wrote: > > > Also, it is > > > about values and not expressions, so that > > > > > > v = java.lang.Math.random(); > > > > > > Well, most often it is about expressions: > > > > a = 2; > > b = 1; > > v = a * a + b; > > System.out.println( v == 5 ); > > > > Had darn well better print 'true'; > > I don't think this fits the definition. "5" is not the assigned value. The test should be v == (a * a + b) Consider double a = 2.3; double b = 1.1; double c = a + b; Then the test c == 3.4 may or may not be true. However, the test c == (a+b) should be true. -- Fred K (snip)
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: The Assignment Principle markspace <markspace@nospam.nospam> - 2014-01-26 14:27 -0800
Re: The Assignment Principle Robert Klemme <shortcutter@googlemail.com> - 2014-01-27 18:50 +0100
Re: The Assignment Principle markspace <markspace@nospam.nospam> - 2014-01-27 13:33 -0800
Re: The Assignment Principle Robert Klemme <shortcutter@googlemail.com> - 2014-01-29 06:10 -0800
Re: The Assignment Principle Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2014-01-29 16:24 +0200
Re: The Assignment Principle FredK <fred.l.kleinschmidt@gmail.com> - 2014-01-27 12:04 -0800
csiph-web