comp.lang.ada
 help / color / mirror / Atom feed
* [Q] Returning Strings From A Function
@ 1997-04-04  0:00 John McCabe
  1997-04-04  0:00 ` Joakim Olsson
                   ` (3 more replies)
  0 siblings, 4 replies; 24+ messages in thread
From: John McCabe @ 1997-04-04  0:00 UTC (permalink / raw)



Hello all.

I hope someone can help me as how to do this has completely slipped my
mind, and I'm having trouble finding what I'm looking for in the Ada
LRM (83) and Barnes.

I have a function, let's call it Text_IO.Name which returns a string.
If I have an object let's say File_Name, what would be the correct (or
best) way to declare that object in order for the statement:

File_Name := Text_IO.Name (File);

(or something similar with slices?) to work without me getting a
constraint error by trying to assign a string of n characters to an
object /=n characters long.

Should I be using subtypes here or what.

I'm sure this will appear to be a really stupid question, but at the
moment I'm being frustrated and I can't think straight!

Thanks in advance.


Best Regards
John McCabe <john@assen.demon.co.uk>




^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~1997-04-09  0:00 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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