[Info-vax] VMS internals design, was: Re: BASIC and AST routines
Bob Gezelter
gezelter at rlgsc.com
Thu Dec 2 19:18:11 EST 2021
On Wednesday, December 1, 2021 at 3:46:00 PM UTC-5, Arne Vajhøj wrote:
> On 12/1/2021 3:35 PM, Dave Froble wrote:
> > Ok, got a bit un-lazy, tried it.
> >
> > This works:
> >
> > 1 !************************************************
> > ! Timer AST Timeout Handler to Cancel I/O
> > !************************************************
> >
> > SUB TCP_TIMER( LONG CH% , &
> > LONG Z2% , &
> > LONG Z3% , &
> > LONG Z4% , &
> > LONG Z5% )
> >
> > CALL SYS$CANCEL( Loc(CH%) By Value )
> >
> > SubEnd
> >
> > This does not work:
> >
> > 1 !************************************************
> > ! Timer AST Timeout Handler to Cancel I/O
> > !************************************************
> >
> > SUB TCP_TIMER( LONG CH% )
> >
> > CALL SYS$CANCEL( Loc(CH%) By Value )
> >
> > SubEnd
> >
> > It seems to have a problem when issuing a read on an I/O channel, not
> > when invoking the QIO that specifies the AST routine.
> >
> > I'm not complaining, this was just a test. I'm a bit curious what
> > caused the error, there was no evident error code or such.
> >
> > In the debugger, there was a report of "too many arguments" or something
> > like that. I'm just guessing that at some point Basic caused some count
> > of arguments and decided that there were too many arguments for the
> > routine as declared.
> >
> > I hate it when the computer thinks it's smarter than me. Of course that
> > bar isn't too high.
> >
> > :-)
> Basic is different from some more low level languages.
>
> But I don't see a problem with Basic here.
>
> The AST function is being called with 5 arguments and
> the AST function is declared to receive 1 argument, so
> something in the generated code does not like it.
>
> Seems perfectly fair to me.
>
> Obviously the documentation should be very clear
> about the 5 arguments.
>
> Arne
Arne,
I know this problem. Encountered it at a client.
BASIC checks the parameter count. Done. C and others do not .
- Bob Gezelter, http://www.rlgsc.com
More information about the Info-vax
mailing list