[fpc-pascal] Case based on type

waldo kitty wkitty42 at windstream.net
Sat Mar 2 03:45:33 CET 2013


On 3/1/2013 17:57, Sven Barth wrote:
[...]
> Alternatively if you don't need to check the hierarchy, but can live with an
> exact match you can do this:
>
> === example begin ===
>
> procedure checkLibrariesAndConnect(db: TSQLConnection);
> begin
> case LowerCase(db.ClassName) of
> // Note: .ClassName won't work here
> 'TPQConnection': ...;
> 'TIBConnection': ...;
> end;
> end;


is there a bug here? i would expect "LowerCase(anything)" to return all lower 
case characters... that means that 'TPQConnection' would not match since it 
contains uppercase characters...

what am i missing?



More information about the fpc-pascal mailing list