I view case without a target as a fancy, more compact, and (IMHO) more readable if-elsif-else block. Because it is more compact and more readable, I prefer it to if-elsif-else and tend to favor it. I may be influenced by some years of doing Common Lisp programming -- I was quite fond of cond. Regards, Morton On Jul 19, 2006, at 6:42 AM, dblack / wobblini.net wrote: > Hi -- > > On Wed, 19 Jul 2006, Morton Goldberg wrote: > >> There are two forms of case block and you have sort of mixed them >> up. Either of the following defs of double_it will work. I think >> the first, using a case without a target, is probably what you >> want, but the second, a case with a target (compares target to >> pattern with ===), can be made to work, too. > > That's a more thorough answer than mine, since I didn't think of the > non-targeted case. But I realize that I never think of it, because > I'm not clear on what its advantages are over a bunch of ifs. I guess > with multiple things you can do: > > case > when a == 1, a == 2 > > etc. > > David