[Info-vax] VMS Basic and quad by value
Arne Vajhøj
arne at vajhoej.dk
Sat Sep 24 20:21:45 EDT 2022
On 9/24/2022 7:54 PM, Dave Froble wrote:
> On 9/24/2022 6:57 PM, Arne Vajhøj wrote:
>> Two compilation units. I only had one.
>
> I never do that ...
I never do Basic os ...
>> It seems to work with long.
>>
>> $ typ z2.bas
>> program z2
>>
>> declare quad v
>>
>> v = 123
>> call f(v)
>>
>> end program
>> !
>>
>> sub f(quad a)
>>
>> print a
>>
>> end sub
>> $ bas z2
>> $ lin z2
>> $ r z2
>> 123
>>
>> Apparently the Basic compiler do look ahead in the compilation unit.
>
> I doubt that. Note that in this last example, you did not attempt to
> declare the argument in the sub statement to be declared by value.
Ooops.
That was a quad default mechanism example not a long example.
I messed up. You are right - it needs to be declared.
Arne
More information about the Info-vax
mailing list