2008/11/6 Graeme Geldenhuys <[EMAIL PROTECTED]>: > On Thu, Nov 6, 2008 at 8:18 AM, Alexander Klenin <[EMAIL PROTECTED]> 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 _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel