From: "David C. Hoos, Sr" <david.c.hoos.sr@ada95.com>
Subject: Re: access_to_constant as subprogram paramater
Date: 1998/09/19
Date: 1998-09-19T00:00:00+00:00 [thread overview]
Message-ID: <xm4csCA59GA.143@samson.airnet.net> (raw)
In-Reply-To: 6u0pmf$rvk$1@nnrp1.dejanews.com
nelson@blaze-net.com wrote in message <6u0pmf$rvk$1@nnrp1.dejanews.com>...
<snip>
Here's the way to do what you want:
procedure Access_Parameter is
Pathname : aliased constant String := "/a/b/c.adb";
-- Declared as constant in order to produce compilation error
type Constant_String_Access_Type is access constant String;
procedure Parse (Input : Constant_String_Access_Type) is
--
-- Would like to declare this:
-- procedure Parse (Input : access constant String) is
-- as Parse never modifies the input string
--
begin
null; -- Parse a pathname string into components
end Parse;
begin
Parse (Pathname'Access);
end Access_Parameter;
David C. Hoos, Sr.
prev parent reply other threads:[~1998-09-19 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-19 0:00 access_to_constant as subprogram paramater nelson
1998-09-19 0:00 ` dewarr
1998-09-19 0:00 ` Tucker Taft
1998-09-20 0:00 ` dewarr
1998-09-19 0:00 ` David C. Hoos, Sr [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox