* SunAda Return Codes
@ 1993-08-09 11:06 Andrew Young
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Young @ 1993-08-09 11:06 UTC (permalink / raw)
How does a SunAda program report a return code to Unix?
In C, I would do exit(n) or return(n) from the main() routine, but
I can't find an equivalent package for SunAda.
Thanks in advance for any pointers.
Andy.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SunAda Return Codes
@ 1993-08-09 13:18 agate!spool.mu.edu!sol.ctr.columbia.edu!news.kei.com!news.oc.com!convex!p
0 siblings, 0 replies; 4+ messages in thread
From: agate!spool.mu.edu!sol.ctr.columbia.edu!news.kei.com!news.oc.com!convex!p @ 1993-08-09 13:18 UTC (permalink / raw)
In article <245b35$3r7@frigate.doc.ic.ac.uk> ajy@doc.ic.ac.uk (Andrew Young) wr
ites:
>How does a SunAda program report a return code to Unix?
>In C, I would do exit(n) or return(n) from the main() routine, but
>I can't find an equivalent package for SunAda.
All you have to do is make your main a function returning integer instead of
a procedure, and then RETURN the proper code.
--
Boris Pelakh Ada Project Leader pelakh@convex.com
Convex Computer Corporation
"If winning isn't important, why keep score ?" -- Lt. Worf, Star Trek TNG.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SunAda Return Codes
@ 1993-08-09 16:56 Paul Durbin
0 siblings, 0 replies; 4+ messages in thread
From: Paul Durbin @ 1993-08-09 16:56 UTC (permalink / raw)
ajy@doc.ic.ac.uk (Andrew Young) writes:
>How does a SunAda program report a return code to Unix?
>In C, I would do exit(n) or return(n) from the main() routine, but
>I can't find an equivalent package for SunAda.
>Thanks in advance for any pointers.
>Andy.
unix.sys_exit(n);
paul durbin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SunAda Return Codes
@ 1993-08-10 13:19 cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!do
0 siblings, 0 replies; 4+ messages in thread
From: cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!do @ 1993-08-10 13:19 UTC (permalink / raw)
In article <1993Aug9.131800.1757@news.eng.convex.com> pelakh@convex.com (Boris
Pelakh) writes:
>In article <245b35$3r7@frigate.doc.ic.ac.uk> ajy@doc.ic.ac.uk (Andrew Young) w
rites:
>>How does a SunAda program report a return code to Unix?
>
>All you have to do is make your main a function returning integer instead of
>a procedure, and then RETURN the proper code.
Please note, return values are implementation dependent, and are not defined
anywhere in the LRM. Making the top-level subprogram a funtion returning an
integer is one solution the compiler writer may choose. Or it may be included
in a OS isterface package. I think the POSIX binding do this.
WRT the form of the top-level subprogram, the compiler must at least be able
to handle a procedure with no parameters. Anything else is at the compiler
writer's discresion.
--
Mark Atwood | My school and employer have too many problems
matwood@peruvian.cs.utah.edu | without being blamed for mine.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1993-08-10 13:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-08-09 11:06 SunAda Return Codes Andrew Young
-- strict thread matches above, loose matches on Subject: below --
1993-08-09 13:18 agate!spool.mu.edu!sol.ctr.columbia.edu!news.kei.com!news.oc.com!convex!p
1993-08-09 16:56 Paul Durbin
1993-08-10 13:19 cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!do
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox