comp.lang.ada
 help / color / mirror / Atom feed
From: DrPi <314@drpi.fr>
Subject: Re: How to check class type ?
Date: Wed, 21 Apr 2021 19:48:22 +0200	[thread overview]
Message-ID: <6080656d$0$3708$426a34cc@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.
Mmmh... Makes me think I did it the wrong way...
I'm a C programmer. I'm afraid I still think as if I where programming in C.
I'll change my code.
Thanks


> Why do you need this?
> 

  parent reply	other threads:[~2021-04-21 17:48 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
2021-04-21 17:48   ` DrPi [this message]
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