[fpc-devel] Re: CodeGear abandons Delphi.NET

Henry Vermaak henry.vermaak at gmail.com
Thu Nov 6 10:57:03 CET 2008


2008/11/6 Graeme Geldenhuys <graemeg.lists at gmail.com>:
> On Thu, Nov 6, 2008 at 8:18 AM, Alexander Klenin <klenin at gmail.com> wrote:
>> 1) http://prismwiki.codegear.com/en/With_(keyword)
>>  but without 'matching' clause.
>
> The following code is just confusing as hell...
>
> with b: Button := new Button do
>  with c: Color := b.BackColor do begin
>    ...
>    b.Text := 'Hello World';
>    self.Text := c.ToString;
>    ...
>  end;
> end;
>
>
>> 1) 'case' by string and type http://prismwiki.codegear.com/en/Case_(keyword)
>
> Did you not know that this is supported in FPC (for some time now).
> ;-) And it's not just limited to ordinal or string types.... I'll
> share my code. We have been using this for some time in our projects.
> :-)
>
> Example usage:

no, fpc only supports case of ordinal, enum and char types.  your
example just shows the most common way to get around that.

henry



More information about the fpc-devel mailing list