home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!widget!brandon
- From: brandon@evb.com (Brandon)
- Subject: Implementation or LRM driven
- Message-ID: <1992Dec22.124210.7098@evb.com>
- Organization: SETT Inc.
- Date: Tue, 22 Dec 1992 12:42:10 GMT
- Lines: 26
-
- 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 functions.
-
- 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.
-
-