[Info-vax] Error Messages in Basic - %BASIC-E-PARMODNOT, mode for parameter <n> of routine <procedure-name> not as declared
Scott Dorsey
kludge at panix.com
Sun Jun 9 10:57:39 EDT 2019
Dave Froble <davef at tsoft-inc.com> wrote:
>
>I guess when one programs in a language that forces variable
>definitions, then one might feel that it's a "good practice".
It is not just good practice, it is critical. I strongly suggest you read
Djikstra on the subject.
>Interesting that so many in c.o.v express their way as being the only way.
I started to program back in the era before variable definitions, when
you could accidentally typo a period for a comma and wind up with spurious
variables appearing in your program instead of syntax errors. I spent a
-lot- of time trying to find bugs that would have been detected easily by
the good practice of defining everything explicitly.
I understand that in 1966 it seemed like a good idea but it turned out not
to be. We lost a Mariner spacecraft because of it.
>> the compiler will not let you substitute one for the other even though
>> both occupy 64-bits. So if you find yourself needing to covert between
>> the two, use a variant record as seen here:
>
>But, yes, I now understand that it's not a problem with the 8 bytes of
>data, it's a problem with the compiler thinking that it's the wrong type
>of data.
Right, it is that it is defined to one thing, while the contents are another
thing.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
More information about the Info-vax
mailing list