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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dbf2052c2a878539 X-Google-Attributes: gid103376,public From: don_harrison@my-deja.com Subject: Re: access-to-constant dispatching params Date: 2000/05/09 Message-ID: <8f8ffp$cbh$1@nnrp1.deja.com>#1/1 X-Deja-AN: 621009442 References: <8f5t2r$g0k$1@nnrp1.deja.com> <3916BA40.3839@nospam.tj> X-Http-Proxy: 1.0 proxy1-stl.int.csc.com.au:3128 (Squid/2.3.STABLE1), 1.0 www-cache1.csc.com.au:3128 (Squid/2.3.STABLE1), 1.0 www-cache2.csc.com.au:3128 (Squid/2.3.STABLE1), 1.0 x36.deja.com:80 (Squid/1.1.22) for client 20.10.51.57, 20.18.1.97, 20.10.3.30, 203.63.164.7 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Tue May 09 07:41:47 2000 GMT X-MyDeja-Info: XMYDJUIDdon_harrison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.7 [en] (X11; I; IRIX 6.5 IP22) Date: 2000-05-09T00:00:00+00:00 List-Id: andt@nospam.tj wrote: > m_cubed@my-deja.com wrote: > > > > Ada provides access-to-variable dispatching > > parameters. [..] > > What it doesn't seem to provide is > > access-to-constant dispatching parameters. [..] > How about using an in parameter? > > function Exercise_Mode ( > State : in State_Type) > return Exercise_Mode_Type; > > If the code that uses this type are maintaining some sort of structure, > list or array of State_Type pointers, one can always dereference: > > Mode := Exercide_Mode (State => State_Ptr.all); Thanks. That almost gives me what I'm after. (I'll have to wait for Ada 0X to provide access-to-constant dispatching parameters before I can acheive consistent signatures using access types). Don Harrison. Sent via Deja.com http://www.deja.com/ Before you buy.