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


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

Re: locals es loco?

Newsgroups comp.lang.java.programmer
Date 2012-10-05 12:41 -0700
References <4b5511c5-799d-4469-9502-cdc39491234b@googlegroups.com> <0n1t68lu75vll0319kj7v8p1i3hc9v8re3@4ax.com> <af02a6e4-d92f-48de-b52e-8953c948a77b@googlegroups.com> <slrnk6ubkl.u9l.avl@gamma.logic.tuwien.ac.at>
Message-ID <38c00c6b-424b-4f3a-8795-5ee01b1417c2@googlegroups.com> (permalink)
Subject Re: locals es loco?
From Lew <lewbloch@gmail.com>

Show all headers | View raw


Andreas Leitgeb wrote:
> Lew wrote:
> 
>> Roedy Green wrote:
>>> int n;
>>> if ( a > 1 ){ n = 1; } 
>>> else { n = 2; }
> 
>>> you could of course abbreviate that to
>>> int n = (a > 1) ? 1 : 2 ;
> 
>> The semantics of initialization, the second form Roedy shows, are slightly different 
>> from the semantics of program execution in the first form.
>> For example, the second form allows the variable to be 'final'.
> 
> So does the first.

Oops.

Correction noted.

-- 
Lew

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


Thread

locals es loco? bob smith <bob@coolfone.comze.com> - 2012-10-04 07:50 -0700
  Re: locals es loco? markspace <-@.> - 2012-10-04 08:09 -0700
  Re: locals es loco? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-10-04 11:45 -0400
    Re: locals es loco? Lew <lewbloch@gmail.com> - 2012-10-04 12:01 -0700
  Re: locals es loco? Roedy Green <see_website@mindprod.com.invalid> - 2012-10-05 00:06 -0700
    Re: locals es loco? Lew <lewbloch@gmail.com> - 2012-10-05 10:55 -0700
      Re: locals es loco? Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-10-05 19:01 +0000
        Re: locals es loco? Lew <lewbloch@gmail.com> - 2012-10-05 12:41 -0700
      Re: locals es loco? Roedy Green <see_website@mindprod.com.invalid> - 2012-10-05 15:38 -0700

csiph-web