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
How to shrink a database?
How to use the sysdiff utility ?
Keep email messages longer on Moto Q 9C
sqlexpress connection string
You are not authorized to view this page , IIS 5
Template Metaprogramming
Connecting to a Sybase ASA database using Ruby
REP-51002: Bind to Reports Server rep_speed1 failed
Perl CGI using Frames
please change this AS2 to AS3? thank you!