From: DrPi <314@drpi.fr>
Subject: Re: How to check class type ?
Date: Wed, 21 Apr 2021 19:33:30 +0200 [thread overview]
Message-ID: <608061f1$0$21614$426a74cc@news.free.fr> (raw)
In-Reply-To: <d66d1eb4-f642-4962-9674-0e70ac2ca537n@googlegroups.com>
Le 21/04/2021 à 19:26, AdaMagica a écrit :
> DrPi schrieb am Mittwoch, 21. April 2021 um 19:08:32 UTC+2:
>> if var'Tag = Leaf1'Tag then
>> ...
>> elsif var'Tag = Leaf2'Tag then
>> ...
>> end if;
>>
>> It works. But is this correct ?
>
> Why not?
>
> if Var in Leaf1 then
> ...
> elsif Var in Leaf2 then
>
> But normally you would use dispatching.
> Why do you need this?
>
I have a Vector which contains pointers to Leaf1/Leaf2 instances.
At some point, I need to know what the cursor points to.
next prev parent reply other threads:[~2021-04-21 17:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 17:08 How to check class type ? DrPi
2021-04-21 17:26 ` AdaMagica
2021-04-21 17:33 ` DrPi [this message]
2021-04-21 17:48 ` DrPi
2021-04-23 16:13 ` John McCabe
2021-04-21 17:40 ` Dmitry A. Kazakov
2021-04-22 8:50 ` DrPi
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox