Liste des Groupes | Revenir à cl c |
On 8/2/24 9:31 PM, Lawrence D'Oliveiro wrote:On Fri, 2 Aug 2024 14:19:49 -0400, James Kuyper wrote:>
I've heard that in some otherI heard that, too. I think it was on some early FORTRAN compilers,
languages, if you call foo(3), and foo() changes the value of it's
argument to 2, then subsequent calls to bar(3) will pass a value of 2 to
bar(). That sounds like such a ridiculous mis-feature that I hesitate to
identify which languages I had heard accused of having that feature ...
on
early machine architectures, without stacks or reentrancy. And with the
weird FORTRAN argument-passing conventions.
I remember it too, and was based on the fact that all arguments were
pass by reference (so they could be either in or out parameters), and
constants were passed as pointers to the location of memory where that
constant was stored, and perhaps used elsewhere too. Why waste
precious memory to setup a temporary to hold be initialized and hold
the value, when you could just pass the address of a location that you
knew had the right value.
Les messages affichés proviennent d'usenet.