comp.lang.ada
 help / color / mirror / Atom feed
From: "Nick Roberts" <Nick.Roberts@dial.pipex.com>
Subject: Re: [Q] Returning Strings From A Function
Date: 1997/04/06
Date: 1997-04-06T00:00:00+00:00	[thread overview]
Message-ID: <01bc42af$e32e3ea0$90f482c1@xhv46.dial.pipex.com> (raw)
In-Reply-To: dewar.860338656@merv




John, did you see my previous post on this subject? In case not, have a
quick butcher's at the following.


declare
   subtype Filename_Index is Integer range 1..12;
   type Filename_String is array (Filename_Index range <>) of Character;
   ...
   FS: Filename_String := ""; -- unconstrained type, so must be initialised
   SS: String := "";
   ...
begin
   ...
   FS := Text_IO.Name(F); -- constraint error raised if longer than 12
   ...
   SS := "Name is: "+Filename_String(FS); -- note the need to convert
   ...
end;


Hopefully this gives you the flavour of it.

Nick.





  reply	other threads:[~1997-04-06  0:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-04  0:00 [Q] Returning Strings From A Function John McCabe
1997-04-04  0:00 ` Joakim Olsson
1997-04-05  0:00 ` John McCabe
1997-04-05  0:00   ` Robert A Duff
1997-04-05  0:00   ` Robert Dewar
1997-04-06  0:00     ` John McCabe
1997-04-06  0:00       ` Robert Dewar
1997-04-06  0:00         ` Nick Roberts [this message]
1997-04-07  0:00           ` Robert A Duff
1997-04-08  0:00             ` Nick Roberts
1997-04-07  0:00               ` Matthew Heaney
1997-04-06  0:00       ` Matthew Heaney
1997-04-05  0:00 ` johnherro
1997-04-05  0:00   ` Robert Dewar
1997-04-06  0:00     ` John McCabe
1997-04-06  0:00       ` Robert Dewar
1997-04-05  0:00   ` Mark & Zurima McKinney
1997-04-07  0:00     ` johnherro
1997-04-07  0:00       ` Robert Dewar
1997-04-07  0:00     ` Jon S Anthony
1997-04-07  0:00       ` johnherro
1997-04-08  0:00     ` Jeff Carter
1997-04-09  0:00     ` Looking for an Ada SCIENTIFIC UNITS checking package Ron House
1997-04-06  0:00 ` [Q] Returning Strings From A Function John McCabe
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox