On Tue, 3 Nov 2015 21:06:45 +0100 Ondrej Pokorny <laza...@kluug.net> wrote:
> Probably the best approach is: > > 1.) Compare base types with the table. > 1a.) If they are equal, goto 2. > 1b.) If they differ, set winner according to table and go to 3. > > 2.) Compare aliases with the table, set winner. > > 3.) Use the original alias of the winner as result. > > About the table: > We need one table for integer and one for floating-point types. > The integer table could look like ['int64', 'sizeint', 'integer', > 'smallint'] (but with all integer types and probably a good idea to > allow the user to modify and enhance it - e.g. a simple TStringList). > The winner is the one closest to the left (top - smallest index). Many libs has such types. I have not counted, but I guess the FPC sources has hundreds of them. Probably some of them conflict each other. So something better than a TStringList should be used. Mattias -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus