[Info-vax] Error Messages in Basic - %BASIC-E-PARMODNOT, mode for parameter <n> of routine <procedure-name> not as declared
Dave Froble
davef at tsoft-inc.com
Sun Jun 9 12:35:17 EDT 2019
On 6/9/2019 10:57 AM, Scott Dorsey wrote:
> 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.
Did that, long ago. He ain't a god. More than one side to just about
every issue. Good practice, I'll give you. Critical, no. A bit too
rigid for me.
>> 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.
Yes, that works. But not doing so can work also.
> 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.
I didn't lose a Mariner spacecraft ....
>>> 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.
And in this specific case, I might not have had that problem. Maybe.
Contrary to what I sometimes write, I do use a lot of explicit declarations.
:-)
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
More information about the Info-vax
mailing list