From: Bulat Ziganshin Date: 2002-12-11T19:53:17+09:00 Subject: Re: elseif? Hello Dave, lisp and clipper are greate languages but... :) Charles Wetherell in "Etudes for Programmers" (1978) describes language Mini which has operator closest to Ruby case: select str of case ("on"): return 1; case ("off",""): return 0; otherwise: return -1; end select it's the beast SELECT construction i ever seen and i was very pleased what ruby includes just the same SELECT operator Tuesday, December 10, 2002, 8:54:18 PM, you wrote: >> If the latter, it has already existed in another language and looks like >> this: >> >> (cond >> ((expr1) (stmt1)) >> ((expr2) (stmt2)) >> ((expr3) (stmt3)) >> ... >> ((exprN) (stmtN)) >> ) DP> Those who know and remember Clipper (and Fox, and probably dBase) will also DP> recognise its case statement as being such a facility: DP> ,---- DP> | Do Case | Case x >> 0 | ? "x >> 0" DP> | Case x == 0 DP> | ? "x == 0" DP> | Case x < 0 DP> | ? "x < 0" DP> | Otherwise DP> | ? "Something wonderful has happened" DP> | EndCase DP> `---- -- Best regards, Bulat mailto:bulatz@integ.ru