[Info-vax] VAX BASIC global variables.
E Thump
ethump at gmail.com
Fri Oct 15 05:42:54 EDT 2021
On Friday, October 15, 2021 at 3:29:53 AM UTC+1, Stephen Hoffman wrote:
> On 2021-10-15 00:23:46 +0000, E Thump said:
>
> > Any VAX BASIC folk here?
> Really VAX BASIC, and not BASIC on OpenVMS VAX with the
> DEC/Compaq/HP/HPE/VSI BASIC compiler?
>
> DEC/Compaq/HP/HPE/VSI BASIC replaced VAX BASIC a very long time ago
> (back in VAX/VMS V3.x, IIRC)...
>
> Assuming this is not the archaic VAX BASIC compiler, but rather the
> DEC/Compaq/HP/HPE BASIC compiler...
>
> https://vmssoftware.com/docs/VSI_BASIC_USER.pdf
> https://vmssoftware.com/docs/VSI_BASIC_REF.pdf
>
> The keyword you're looking for is EXTERNAL. See page 105 in the
> reference manual, linked above.
>
> COMMON (reference manual page 67) is not what you want.
>
>
> --
> Pure Personal Opinion | HoffmanLabs LLC
It identifies as "VAX BASIC V3.8-000" when I start it. Came with my uVAX3100-80 running OpenVMS 6.2
Here's what I've done now:
External SUB adder (integer,integer)
External INTEGER a,b
a=100
b=200
print "a+b before sub: ",a+b
call adder (10,20)
print "a+b after sub: ",a+b
end program
sub adder (integer c,integer d)
a=400
b=1000
print "a+b in sub: ",a+b
print "c+d in sub: ",c+d
end sub
compiles clean but throws this when linking :
%LINK-W-NUDFSYMS, 2 undefined symbols:
%LINK-I-UDFSYM, A
%LINK-I-UDFSYM, B
%LINK-W-USEUNDEF, undefined symbol A referenced
in psect $CODE offset %X00000021
in module TEST$MAIN file SYS$USERS:[ECKY]TEST.OBJ;24
%LINK-W-USEUNDEF, undefined symbol B referenced
in psect $CODE offset %X0000002C
in module TEST$MAIN file SYS$USERS:[ECKY]TEST.OBJ;24
%LINK-W-USEUNDEF, undefined symbol A referenced
in psect $CODE offset %X00000048
in module TEST$MAIN file SYS$USERS:[ECKY]TEST.OBJ;24
......
More information about the Info-vax
mailing list