[fpc-pascal] some new features to delphi prisem
    David Emerson 
    dle3ab at angelbase.com
       
    Tue Feb 23 08:44:39 CET 2010
    
    
  
On Sat 20 Feb 2010, Jürgen Hestermann 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;
or this...
type foo_type = (bla, foo, baz);
var foo_names : array [foo_type] of string = ('hello', 'bye', 'adius');
y := foo_names[other];
    
    
More information about the fpc-pascal
mailing list