Re: pass by value vs. reference

by "Srinivasan Ramakrishnan" <srinivar(at)md3.vsnl.net.in>

 Date:  Wed, 6 Sep 2000 00:42:27 +0530
 To:  "Jonathan Blake" <jonblake(at)lw-oasis.org>,
<hwg-languages(at)hwg.org>
 References:  oasis
  todo: View Thread, Original
AFAIK all arguments to a function with the possible exception of arrays are
pass be value.

Global variables are the only way to simulate pass be reference. Come to
think of it even arrays are pass by value. Current implementations like
IE5.5 may have changed that, but this is true for NS and IE upto 4.

IE may have a workaround. But then that's only coz JS has become a scripting
language on Windows and they have to give it a steroid boost.

-Srini


----- Original Message -----
From: Jonathan Blake <jonblake(at)lw-oasis.org>
To: <hwg-languages(at)hwg.org>
Sent: Tuesday, September 05, 2000 10:09 AM
Subject: pass by value vs. reference


> I'm almost sure this has been covered so far, but the ability to search
> the list's archive no longer really exists AFAIK. Could someone
> elucidate how JavaScript decides when to pass a function's arguments by
> value and when it passes them by reference?
>
> --
> Jon
>

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA