ik wrote: > On Sat, Feb 20, 2010 at 20:01, Jürgen Hestermann > <juergen.hesterm...@gmx.de <mailto:juergen.hesterm...@gmx.de>> wrote: > > > > y := case Other of > bla : 'hello'; > foo : 'bye'; > baz : 'adius'; > end; > > > What do you gain with this? > Doesn't look much different to > > > case Other of > bla : y := 'hello'; > foo : y := 'bye'; > baz : y := 'adius'; > end; > > > Shorter write imho. >
Which also means "less chance of mistake". For example, if you decide later to change "y" to "y1", you only have to change the code in one place, not three. Functional "case" and "if" are not only from Ruby, also from all functional languages (sml, ocaml), also Python and even C have functional "if". I'm not saying that this is some revolutional or essential feature. But just because "we can work without it" doesn't mean it's totally useless :) Michalis _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal