From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!seismo!rochester!pt.cs.cmu.edu!andrew.cmu.edu!km38# From: km38#@andrew.cmu.edu.UUCP Newsgroups: comp.lang.ada Subject: Formal out parameters Message-ID: Date: Tue, 24-Feb-87 22:20:31 EST Article-I.D.: andrew.MS.V3.18.km38.80021108.allentown.ibm032.3469.2 Posted: Tue Feb 24 22:20:31 1987 Date-Received: Fri, 27-Feb-87 05:22:04 EST Organization: Carnegie-Mellon University ReSent-Date: Wed, 25 Feb 87 00:38:47 est ReSent-From: postman#@andrew.cmu.edu ReSent-To: nntp-xmit#@andrew.cmu.edu Return-path: To: outnews#ext.nn.comp.lang.ada@andrew.cmu.edu List-Id: Another problem... with the following declaration, type RESOURCE_REC; type RESOURCE is access RESOURCE_REC; type RESOURCE_REC is record RESOURCE_NAME : FOO.NAME; ... end; procedure CREATE (NEW_RESOURCE : out RESOURCE; RESOURCE_NAME : in FOO.NAME) is begin NEW_RESOURCE := new RESOURCE_REC; NEW_RESOURCE.RESOURCE_NAME := RESOURCE_NAME; end CREATE; I get the following error (for the second assignment): 106 NEW_RESOURCE.RESOURCE_NAME := RESOURCE_NAME; ................1 %ADAC-E-READ, (1) Reading from subprogram 'out' formal NEW_RESOURCE at line 92 is not allowed Does this mean that my parameter declaration only allows me to assign a value to the pointer, not to the record pointed to? It seems to me that this error is not justified, as I am not reading anything from the NEW_RESOURCE parameter, but merely initializing (writing to) part of it. Also, with another compiler validated with ACVC 1.5, there is no error. Thanks, --Magnus Arpa: magnus@andrew.cmu.edu UUCP: seismo!andrew.cmu.edu!magnus