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,ea4421b81fc97bda,start X-Google-Attributes: gid103376,public From: m_cubed@my-deja.com Subject: Access-to-Constant parameters Date: 2000/05/08 Message-ID: <8f5t2m$g0i$1@nnrp1.deja.com>#1/1 X-Deja-AN: 620564430 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 x38.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: Mon May 08 06:03:33 2000 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.7 [en] (X11; I; IRIX 6.5 IP22) Date: 2000-05-08T00:00:00+00:00 List-Id: Ada provides access-to-variable parameters in operation signatures which allow dispatching. For example: type State Type is tagged private; Set_Exercise_Mode ( State_Ptr: access State_Type; Exercise_Mode: in Exercise_Mode_Type); What it doesn't seem to provide is access-to-constant parameters for dispatching operations. For example, it would be useful to do the following to ensure that the query doesn't update the object being queried (hypothetical syntax): function Exercise_Mode ( State_Ptr: access constant State_Type) return Exercise_Mode_Type; Is there any way of doing this, or am I forced to sacrifice dispatching by using a specific access-to-constant type as the formal parameter? For example: type State_Type is tagged private; type RO_Access_State_Type is access constant State_Type; function Exercise_Mode ( State_Ptr: RO_Access_State_Type) return Exercise_Mode_Type;da provides access-to-variable parameters in operation signatures which allow dispatching. For example: type State Type is tagged private; Set_Exercise_Mode ( State_Ptr: access State_Type; Exercise_Mode: in Exercise_Mode_Type); What it doesn't seem to provide is access-to-constant parameters for dispatching operations. For example, it would be useful to do the following to ensure that the query doesn't update the object being queried (hypothetical Sent via Deja.com http://www.deja.com/ Before you buy.