[haXe] Request: ? : operators

Ralf Bokelberg ralf.bokelberg at gmail.com
Fri Dec 15 23:31:30 CET 2006


Hi John

I guess Danny ment that "if" is more powerful in haxe, because it can
be used as an expression.

Cheers,
Ralf.


On 12/15/06, John Grden <neoriley at gmail.com> wrote:
> just out of curiosity, why is it "more powerful" than:
>
> var y:Number = flag ? 1 : 2;
>
> ?
>
> Looks like it does the same job to me.
>
>
> On 12/15/06, Danny Wilson <danny at decube.net> wrote:
> > Hey,
> >
> > If you've read the language reference, you would know haXe has a more
> > powerfull if statement, that can be used the same way.
> >
> > Quote: "var y : Int = if( flag ) 1 else 2;"
> >
> > On Fri, 2006-12-15 at 20:30 +0000, Aaron Gray wrote:
> > > Hi,
> > >
> > > Heres a request for C like ? and : operators as they can reduce code
> > > down from multiple if..else statement down to a single line of code.
> > >
> > > Aaron
> > >
> > > --
> > > haXe - an open source web programming language
> > > http://haxe.org
> >
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
>
>
>
> --
>  [  JPG  ]
> --
> haXe - an open source web programming language
> http://haxe.org
>
>


-- 
Ralf Bokelberg <ralf.bokelberg at gmail.com>
Flex & Flash Consultant based in Cologne/Germany



More information about the Haxe mailing list