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,60dd4fe7723c0ef X-Google-Attributes: gid103376,public From: "David Botton" Subject: Re: Ada Core Technologies announces GNATCOM Date: 2000/04/12 Message-ID: #1/1 X-Deja-AN: 610340518 References: <8coc5e$do2$1@nnrp1.deja.com> <8d0ru2$arc$1@nnrp1.deja.com> <8d1paa$n0n4@ftp.kvaerner.com> <8d2d8j$1tk$1@nnrp1.deja.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700 X-Abuse-Info: Otherwise we will be unable to process your complaint properly X-Complaints-To: support@usenetserver.com Organization: WebUseNet Corp http://www.usenetserver.com - Home of the fastest NNTP servers on the Net. NNTP-Posting-Date: Wed, 12 Apr 2000 15:40:13 EDT Newsgroups: comp.lang.ada Date: 2000-04-12T00:00:00+00:00 List-Id: I am not sure I understand how I am confused, although I may very well be. In the Turbo C version I used (some many years ago) if struct q was large enough doing m.a++ in the function as you do below would in fact change the m passed in, ie. a pass by reference. ex. struct q z; z.a = 5; clobber (z); z.a now equals 6 (providing of course that size(q) past the compiler limit for passing by value/copy). I even remember a "pragma" that let me play with the minimum size for pass by copy instead of pass by reference. Am I missing something? (most likely. If you can explain it to me, it would be helpful.) David Botton > int clobber (struct q m) { > m.a++; > return m.a; > } > >called in c passing a value of the struct type does NOT change >the value of the passed variable.