From: Sebastian Hungerecker Date: 2008-01-31T16:14:29+09:00 Subject: Re: Quizzical? Wyatt Greene wrote: > Can you guess what this program will do when run? > > a = ?????:????????:??:?????:?? a = ?? ? ?? : ?? ? ?? ? ?? : ?? : ?? ? ?? : ?? It's pretty clear to see that this will return ??(63) without looking further into the structure of the code, but let's take a closer look at the order in which the ternaries are executed anyway: a = ?? ? (??) : (?? ? (?? ? ?? : ??) : (?? ? ?? : ??)) So we have: if 63 63 else if 63 if 63 63 else 63 end else if 63 63 else 63 end end end Result: 63 -- Jabber: sepp2k@jabber.org ICQ: 205544826