From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,24c2bbee2aceff98 X-Google-Attributes: gid103376,public From: hainque@news.enst.fr (Olivier Hainque) Subject: Re: Ada 95 dispatching question Date: 1997/11/27 Message-ID: <65ke04$2ss$1@enst.enst.fr>#1/1 X-Deja-AN: 293204262 References: <880581829.29833@dejanews.com> Organization: ENST, France Newsgroups: comp.lang.ada Date: 1997-11-27T00:00:00+00:00 List-Id: Adam Beneschan (adam@irvine.com) wrote: : What should the following program output? I'm trying to get it to : output : 3/TRUE/"abcdefghij"/ 15 : but it outputs instead : 3/TRUE/??? The output is correct, ... : If the output is correct, then why? In particular, is the line marked : "<=== HERE" a dispatching call, and if not, why not? And how would I : have to modify the program to get it to do what I'd like it to do, : given that declaring do_to_aux and do_to_rec in PACK1 is not an : option? The call : do_to_aux (auxinfotype2 (r.f3.all)); -- <=== HERE is not a dispatching call since the actual argument you give is not classwide typed. In fact, you actually tell : "I want to call the do_to_aux procedure with an argument of type 'auxinfotype2'". For this call to be dispatching, you have to provide a classwide argument. I think the following will do : : do_to_aux (auxinfotype2'Class (r.f3.all)); Hope this helps. -- Olivier Hainque -- E-mail: hainque@inf.enst.fr P-mail: Telecom Paris 46, rue Barrault - 75634 Paris cedex 13