[Info-vax] VMS Basic and quad by value
Neil Rieck
n.rieck at bell.net
Sat Sep 24 06:23:50 EDT 2022
On Friday, September 23, 2022 at 4:37:44 PM UTC-4, Arne Vajhøj wrote:
> I am not good at Basic so I may be missing something obvious.
>
> As I read the manual then I should be able to pass a quad by value.
>
> But the compiler disagrees.
>
> Can anybody shed some light on this?
>
> Arne
I have written "a lot" of BASIC programs for VMS and OpenVMS systems since 1987 and published many demos here:
https://neilrieck.net/demo_vms_html/openvms_demo_index.html
and have saved some recent BASIC manuals here:
https://neilrieck.net/misc/pdf/vms-docs/
IIRC, the QUAD data type was added to BASIC for the port from VAX to Alpha and it appears that it was not implemented fully or properly tested by Compaq. To make matters worse, many broken items were not fixed by HP for the port to Itanium. Some of the problems with BASIC-1.7 (see first link) were fixed by HP then sent to me as private patches but were never put into production for other customers. As I understand it, all my problems with the compiler and BASRTL have all been fixed in the VSI branded products so customers still working in the OpenVMS ecosystem need to move to VSI ASAP.
A good argument could be made about passing "a byte or word by value" being more efficient than "by ref" and we thought a lot that way on VAX. But anything larger than an address (includes a QUAD) would be passed more efficiently by ref. More than 5 years ago I had to jump through a few hoops in order to interface VMS-BASIC with C (or C-API) in order to connect BASIC with TCP/IP and MySQL/MariaDB client. In order to do build them I wrote these passing demos but do not recall ever passing anything by value.
https://neilrieck.net/demo_vms_html/openvms_demo_index.html#hybrid-demo-1
Neil Rieck
Waterloo, Ontario, Canada.
http://neilrieck.net
More information about the Info-vax
mailing list