[lazarus] FPC Request
Shane Miller
SMiller1 at stvgb.org
Mon Oct 25 16:26:58 EDT 1999
I request that because Delphi allows it..
Shane
>>> Florian Klaempfl <Florian.Klaempfl at gmx.de> 10/25/99 03:04PM >>>
Shane Miller wrote:
>
> Another request:
>
> Delphi allows you to assign a Pointer variable to a TObject by doing the conversion for you, so you don't need to typecast it.
> For example
>
> Var
> P: Pointer;
> T: TObject;
>
> Begin
>
> P := T;
>
> End;
>
> FPC makes you typecast T as a Pointer.
No problem here!
>
> Also, the other way around should work too.
>
> T := P;
>
> so I don't need to typecast P as a TObject.
>
> Could this be done?
Hmmm, I don't know if this should done! It seems to be dangerous. If someone
wants to assign a pointer to tobject, he should know what he do and type cast it!
_________________________________________________________________
To unsubscribe: mail lazarus-request at miraclec.com with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus
More information about the Lazarus
mailing list