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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8e64f4db20d57eb5 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Call by reference vs. call by value Date: 1996/08/02 Message-ID: #1/1 X-Deja-AN: 171854092 references: <31F10E50.726@egr.uri.edu> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-08-02T00:00:00+00:00 List-Id: Felaco said: "That's a good question - just how does the compiler determine how to pass array parameters where rep specs or packing applies? Does it use bit pointers, or does it just make a properly aligned copy and pass it along? If the LRM dictated that all arrays were passed by reference, then the compiler could decide to use bit pointers (if the architecture provided efficient means to do so) or it could just resort to making a copy and passing a reference to it." That's a common confusion, but it is quite wrong. Call by reference is a semantic concept, it is not about passing pointers (the actual mechanism might well involve pointer passing, but that's an implementation level issue). Passing a pointer to a copy is NOT call by reference, but rather call by value. As for the first question, "Does it use bit pointers or does it just ..." the answer to this question is yes!