[Info-vax] VMS internals design, was: Re: BASIC and AST routines
Arne Vajhøj
arne at vajhoej.dk
Wed Dec 1 15:45:50 EST 2021
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
More information about the Info-vax
mailing list