[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Assignment syntax question



You're kidding, right? Not short enough? ".if(" vs " ? "

Now you're just being greedy :)
hjh

On Saturday, May 1, 2004, at 14:53 US/Eastern, Terry Lee wrote:

Doesn't look quite like I am used to, coming from a strong Perl background,
but short enough to suit my tastes.  I'll get used to it. :-)

Thanks James

On 5/1/04 1:23 PM, "James Harkins" <jamshark70@xxxxxxxxx> wrote:

a = (b == 3).if(1, 2)

or

a = if(b == 3, 1, 2)

hjh

On Saturday, May 1, 2004, at 13:49 US/Eastern, Terry Lee wrote:

Is there an equivalent to the following in SC lang?

a = (b == 3) ? 1 : 2;

Or do I need to do it the long way. I'm just a big fan of one liners.

_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users


____________________________________

H. James Harkins /// dewdrop_world
http://www.duke.edu/~jharkins

"If attacked by a lion, thrust your arm down his throat.
This takes some practice."  -- Cyril Connolly

_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users

_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users


____________________________________

H. James Harkins /// dewdrop_world
http://www.duke.edu/~jharkins

"If attacked by a lion, thrust your arm down his throat.
This takes some practice."  -- Cyril Connolly