From: trivas7@... Date: 2002-06-10T11:19:06+09:00 Subject: Re: Ternary Operator Simon Bailey wrote: > Is there some sort of ternary operator in Ruby like the one in C++? > > eg. > > greaterThanFive = (x > 5) ? "yes" : "no"; Yes, to my newbie-knowledge it is borrowed from C: condition? expr1 : expr2 i.e., print "This page has been viewed ", counter, " time" print (counter == 1) ? "" : "s"