comp.lang.ada
 help / color / mirror / Atom feed
* Use procedure(s) in a function ?
@ 2015-12-15 20:29 comicfanzine
  2015-12-15 22:20 ` Simon Wright
  0 siblings, 1 reply; 4+ messages in thread
From: comicfanzine @ 2015-12-15 20:29 UTC (permalink / raw)


Hi ;

Is it possible to use procedure(s) in a function ??

I Checked the A.R.M =  http://www.adaic.org/resources/add_content/standards/95lrm/ARM_HTML/RM-6-4.html

http://www.adaic.org/resources/add_content/standards/95lrm/ARM_HTML/RM-6-3.html

No examples about this....

If yes =

I'm trying to return a global variable's String value , and want to use the function later in a procedure .

The code =

function get_name return String 
is begin
Put_line("Your name?");
 Get(name); -- name is in "globals"
 put(name);
return name;
end get_name;

package globals 
is 
name : String(1..20) ;
end globals;

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

end of thread, other threads:[~2015-12-18  4:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-15 20:29 Use procedure(s) in a function ? comicfanzine
2015-12-15 22:20 ` Simon Wright
2015-12-16  1:51   ` comicfanzine
2015-12-18  4:31     ` comicfanzine

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