On 03/02/2013 01:13 PM, Ivanko B wrote:
> TypeOf
>
> Synopsis
>
>       function TypeOf (var x): PObjectType;
> Description
>
> Returns a pointer to the VMT of an object type or variable. This
> pointer can be used to identify the type of an object.
>
> TypeOf can be applied to expressions of object type and to object type
> names. In the former case, the actual type of polymorphic objects is
> returned.
>
> Conforming to
> TypeOf is a Borland Pascal extension.
>
> Example
>
>       program TypeOfDemo;
>       type
>         FooPtr = ^Foo;
>         BarPtr = ^Bar;
>
>         Foo = object         { Has a VMT, though it doesn't }
>           x: Integer;        { contain virtual methods.     }
>           constructor Init;
>         end;
>
>         Bar = object (Foo)
>           y: Integer;
>         end;
>
>       constructor Foo.Init;
>       begin
>       end;
>
>       var
>         MyFoo: FooPtr;
>
>       begin
>         MyFoo := New (BarPtr, Init);
>         if TypeOf (MyFoo^) = TypeOf (Bar) then  { True }
>           WriteLn ('OK')
>       end.
>
> See also
> BitSizeOf, AlignOf, PObjectType, SetType, SizeOf, OOP.
>
If you are replying to my last post I wanted to know how to determine 
the component type while I am in the ide and writing program code.

Not while the program is running.

Patrick

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to