Operating System - OpenVMS
1752315 Members
5499 Online
108786 Solutions
New Discussion юеВ

Possible Alpha BASIC 1.6 compiler problem?

 
John Gillings
Honored Contributor

Re: Possible Alpha BASIC 1.6 compiler problem?

Nature of the beast! Basic was never intended to be a strongly typed language.

"option type=explicit"

was added to give rudimentary protection against typos in variable names, but explicit typing doesn't imply anything about argument list checking. What might be of use here is another option, perhaps "arglists=strict" (or similar). However, the chances of that happening, given the support status of the product, are vanishingly small.

Unfortunately there are too many places where the Basic syntax for defining argument lists can't deal with all the possibilities, especially for routines in languages other than Basic. Thus, there has to be an escape mechanism to allow unchecked argument lists.

Basic was intended to be an "easy" programming language (oxymoron!). The reality is programming is never, and can never be "easy" for non-trivial programs.

I've found that the very features intended to make Basic easy, actually have the reverse effect! You need to be very careful about what you write, because the compiler makes many assumptions on your behalf.
A crucible of informative mistakes
Jonathan Cronin
Advisor

Re: Possible Alpha BASIC 1.6 compiler problem?

re: compiler versons,

I tested the one-argument version with Itanium 1.7, Alpha 1.7 and Vax 3.9 and got consistent results. I tested the two argument version with both 1,7 compilers and again got consistent results.

Jonathan
Neil Rieck
Advisor

Re: Possible Alpha BASIC 1.6 compiler problem?

Same with me. While compiling with BASIC v1.6 Alpha, I get the correct behavior for testing paramater lists (param numbers as well as data types). But I do need to append a null list to functions with no expected parameters. (but as others have already suggested, this is probably the recommended technique)