Microsoft
Software
Hardware
Network
Question : Conditional Operator
Hi, is there a conditional operator in Ruby like the ? in C/C#, ie
x = y == nil ? 0 : 1
I know you can do
x = if (y == nil) then 0 else 1 end
Just wondering if the more compact is possible in Ruby.
Thanks!
Answer : Conditional Operator
you can use the ? in ruby as in C
x = y == nil ? 0 : 1
will work
Random Solutions
Flash CS3 with AIR
Reference a created movie clip, AS2 Flash 8
How to display news and stocks in to my site.
how do I write Stored Procedure where in SQL query 'FROM' clause is selected from dropdownlist!!!!!
Only Show Rows that contain specified name
Lock the sheet...
How do you detach a movie clip when any action causes the movie to go to any other frame?
Need a better web host provider
PC failing to start
Can't delete items in Outlook 2002 deleted items folder