Hi! Am Samstag, den 20.02.2010, 19:01 +0100 schrieb Jürgen Hestermann: > > > 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;
You are looking at the wrong example! Clearly, for variable assignment you don't gain anything. But for a function argument you do! WriteLn('The value is ',(if X then 'true' else 'false'), ' at the moment.'); and MakeBackup(FileName,ChangeExtension(FileName, case BackupExtension of exBak : '.bak'; exBkp : '.bkp'; exTilde : '~'; else '.bak' End)); Bye Hansi _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal