On 11/12/07 10:34 AM, in article 1194881671.877.1194840415@[EMAIL PROTECTED]
"David Williams" <david.williams@[EMAIL PROTECTED]
> wrote:
> -> Yes, that's what I was trying to explain to Richard. People who
learned
> -> the ANSI / ISO Standard way of doing it (by Reference) actually use
> -> and rely on that default. People who learned on BBC and some other
> -> variants where the default is by value won't use calling by Reference
> -> as often. Of course these are just tendencies, not hard and fast
rules.
> -> I'm sure there are some Standard users who don't use the changed
> -> parameters just as there are some BBC users who do.
>
> -> Tom Lake
>
> If the language is set up to call by reference, it's easy to write code
> that effectively calls by value, e.g.:
>
> CALL Twiddle (X + 0)
>
> If Twiddle changes the value of its input parameter, the value of X in
> the calling routine will *not* be changed.
>
> But how easy is it to do the other way around? If the language is set
> up to call by value, can we write simple code that effectively calls by
> reference? I can't think of an easy way to do it.
>
> Of course, the language may have specific commands to switch from one
> method of calling to the other, but without them, a dialect that calls
> by value can't easily be made to call by reference.
Passing a pointer using VARPTR should work, shouldn't it?
I'm used to default to pass by reference, where CALL SUB((A)), the extra
parens forces by value.


|