[Info-vax] Error Messages in Basic - %BASIC-E-PARMODNOT, mode for parameter <n> of routine <procedure-name> not as declared

Neil Rieck n.rieck at sympatico.ca
Sun Jun 9 14:00:32 EDT 2019


On Sunday, June 9, 2019 at 12:43:02 PM UTC-4, Bob Gezelter wrote:
> On Sunday, June 9, 2019 at 10:57:41 AM UTC-4, 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.  
> > 
> > >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."
> 
> Scott,
> 
> Quite. Many miss the point that a "type" definition is more than storage space, it is also semantics. INTEGER*4 and REAL*4 (FORTRAN) are not the same, even though they reserve the same amount of memory.
> 
> In C, pointers to different items (e.g., struct, long, long long, unsigned long long) may be the same size, but are not the same "type" for type matching purposes, hence the use of "void *" in many contexts.
> 
> In BASIC, BASIC$QUADWORD is a record of two longwords, whereas QUAD is a signed quadword. Both refer to 64-bit memory areas, but they are not, in the language context, equivalent. If nothing else, the syntax is different, which will cause a compilation error.
> 
> - Bob Gezelter, http://www.rlgsc.com

More than a decade ago, I renovated some code where the original programmer had done his own declaration of system functions including "sys$bintim". The declaration was done in an informal way using a 32-bit long rather than a 64-bit long. Since the compiler allowed it while the linker just followed orders.

But each time sys$bintim was invoked, 64-bits were clobbered; the 32-bits my buddy had declared as well as the 32-bits after it. This is the kind of stuff that will keep you up at night.

Neil Rieck
Waterloo, Ontario, Canada.
  

But invoking sys$bintim meant that 64-bits was consumed so the variable after



More information about the Info-vax mailing list