comp.lang.ada
 help / color / mirror / Atom feed
From: widget!brandon@uunet.uu.net  (Brandon)
Subject: Implementation or LRM driven
Date: 22 Dec 92 12:42:10 GMT	[thread overview]
Message-ID: <1992Dec22.124210.7098@evb.com> (raw)

I have been trying to determine any rules either in AI's, LRM or other sources
in how a compiler is permitted to allocate/deallocate return values for functio
ns.

When the information is returned from a function some space must be allocated, 
and placed on the call stack.  In the case of a function returning a non-scalar
when MUST that space be deallocated (or can an implemenation lose it).  I've
seen many cases and can not find a specific rule.

As a second question, in this example:
	subtype MYSTR is STRING(1..50);
	function Str(X: in INTEGER) return MYSTR;

	X: BUFFER(1..200);
	X := Str(1) & Str(2) & Str(3) & Str(4);    <---- here

	During the "&" operations being called is the memory being
	used 50+50+100+50+150+50+200 = 650 allowably, unavoidable, or
	completely implementation dependent.

Any references would be appreciated

-- 
Office Automation, n.:
	The use of computers to improve efficiency by removing anyone
	you would want to talk with over coffee.

                 reply	other threads:[~1992-12-22 12:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

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