On Mon, Dec 30, 2013 at 11:47 AM, Michael Van Canneyt <mich...@freepascal.org> wrote: > > >>> No. You make a wrong assumption. >>> >>> TypeInfo will return the DECLARED type of S. >>> >>> Not the type that was actually passed when calling the routine: >>> That has been converted to the declared type of S by the compiler even >>> before the routine ShowType is called. >> >> >> You're right. >> Well is there another way to do I showed before? >> I want to create a record/object type to receive a "string" but I need >> to know which string type was before. > > > There is no way. > > >> >> If I change the code (see below) to use Pointer type it works but I >> think this is won't help me. > > > No, it will not help you.
Yes... Well, I was trying the easy way but not possible. :-) > One thing you can do is use overloading: > > [code] > > The compiler will choose the correct overloaded version, and you will know > which one she picked. > > But it would help to know what exactly you want to achieve. I had some ideas looking at your code. Thank you. Regards, Marcos Douglas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal