Re: on call by reference

Liste des GroupesRevenir à cl scheme 
Sujet : Re: on call by reference
De : alicetrillianosako (at) *nospam* gmail.com (Schol-R-LEA)
Groupes : comp.lang.scheme
Date : 20. Mar 2024, 17:07:36
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uteu3o$1hsjh$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
I apologize, I lost my train of thought for part of this:
Schol-R-LEA:

In call-by-reference, what is passed is a pointer or similar reference to the
...to the variable.
In effect, a language in which call-by-reference is used, parameters are implicit pointers to the arguments. So, by comparison to C,
void foo(int bar)
{
    bar = 23;
}
in a call-by-reference dialect would be equivalent to
void foo(int* bar)
{
    *bar = 23;
}
in standard C.
For obvious reasons, this presents problems with potential side effects and is harmful to modularity, as any change to the parameter variable would silently change the argument. This is why most languages which support call-by-reference at all do so explicitly, with call-by-value being the default.

Date Sujet#  Auteur
19 Mar 24 * on call by reference19Johanne Fairchild
20 Mar 24 +- Re: on call by reference1Lawrence D'Oliveiro
20 Mar 24 +* Re: on call by reference3Dmitri Volkov
20 Mar 24 i+- Re: on call by reference1Lawrence D'Oliveiro
20 Mar 24 i`- Re: on call by reference1Schol-R-LEA
20 Mar 24 +* Re: on call by reference4Alan Bawden
20 Mar 24 i`* Re: on call by reference3Johanne Fairchild
21 Mar 24 i `* Re: on call by reference2Alan Bawden
21 Mar 24 i  `- Re: on call by reference1Johanne Fairchild
20 Mar 24 `* Re: on call by reference10Schol-R-LEA
20 Mar 24  +* Re: on call by reference5Schol-R-LEA
21 Mar 24  i`* Re: on call by reference4Chris Vine
21 Mar 24  i `* Re: on call by reference3Lawrence D'Oliveiro
22 Mar 24  i  `* Re: on call by reference2Chris Vine
22 Mar 24  i   `- Re: on call by reference1Lawrence D'Oliveiro
21 Mar 24  +* Re: on call by reference2Alan Bawden
21 Mar 24  i`- Re: on call by reference1Schol-R-LEA
21 Mar 24  `* Re: on call by reference2Lawrence D'Oliveiro
21 Mar 24   `- Re: on call by reference1Schol-R-LEA

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal