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,b47b15fda2aeb0b2 X-Google-Attributes: gid103376,public From: jvl@ocsystems.com (Joel VanLaven) Subject: Re: Two ideas for the next Ada Standard Date: 1996/09/04 Message-ID: <1996Sep4.192955.9380@ocsystems.com>#1/1 X-Deja-AN: 178498003 references: <50aao3$3r88@news-s01.ny.us.ibm.net> organization: OC Systems, Inc. newsgroups: comp.lang.ada Date: 1996-09-04T00:00:00+00:00 List-Id: Jon S Anthony (jsa@alexandria) wrote: : procedure P ( X : Xt ); : or if you want to be explicit: : procedure P ( X : in Xt ); : This is basically the correct equivalent to C++ : void p (const xt& x) While this is a minor point, it happens to be one that I am currently involved with and so couldn't resist mentioning :) If Xt is a tagged type (ie. the c++ "type" is a class) void p (const xt& x) actually seems to be modeled more accurately by procedure P ( X : in Xt'class ); If xt is not a class then the simpler translation is correct, after all if xt is not a class then void p (const xt& x) is the same as void p (xt x) except for possibly effieciency. In the Ada world our compilers are smart enough to decide on the most efficient way to do this sort of parameter passing without our error-prone help :) -- -- Joel VanLaven