comp.lang.ada
 help / color / mirror / Atom feed
From: Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject: Re: actual for variable name must be variable compiler error
Date: Tue, 30 Sep 2014 09:17:41 -0400
Date: 2014-09-30T09:17:41-04:00	[thread overview]
Message-ID: <p4bl2a1hsjg5ab3j3fceu61asuttrsfdub@4ax.com> (raw)
In-Reply-To: m0cte9$58d$1@dont-email.me

On Tue, 30 Sep 2014 00:27:54 +0000 (UTC), Simon Clubley
<clubley@remove_me.eisner.decus.org-Earth.UFP> declaimed the following:

>However, I want to make it clear I don't write production code like
>that. If an in parameter needs modifying in a C program it gets copied
>into a local variable and worked on there. Modifying an in parameter
>in the way it's done in my example just feels so very wrong to me even
>when the language lets you do it...
>
	The main concept is that the parameter, in C, is effectively already a
local copy... Changes don't propagate back out (unless one has explicitly
declared it a pointer type and is doing dereferencing on the pointer; or a
C++ reference parameter).

	In FORTRAN, it was always a reference and the compiler handled
dereferencing for you.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/


  parent reply	other threads:[~2014-09-30 13:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-29  0:48 actual for variable name must be variable compiler error Stribor40
2014-09-29  2:50 ` Jeffrey Carter
2014-09-29 10:39 ` Brian Drummond
2014-09-29 19:37   ` Simon Clubley
2014-09-29 21:33     ` Georg Bauhaus
2014-09-30  0:27       ` Simon Clubley
2014-09-30 12:09         ` Peter Chapin
2014-09-30 13:17         ` Dennis Lee Bieber [this message]
2014-09-30 19:48           ` Simon Clubley
2014-09-30 14:47         ` Adam Beneschan
2014-09-29 14:27 ` Denis McMahon
replies disabled

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