[Info-vax] VMS internals design, was: Re: BASIC and AST routines
Arne Vajhøj
arne at vajhoej.dk
Thu Dec 2 15:14:13 EST 2021
On 12/2/2021 11:36 AM, John Reagan wrote:
> On Wednesday, December 1, 2021 at 9:31:29 PM UTC-5, Tim Sneddon wrote:
>> Dave Froble <da... at tsoft-inc.com> 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
>> $ HELP/LIBRARY=BASICHELP RUN_TIME_ERRORS TOOMANARG
>>
>> RUN_TIME_ERRORS
>>
>> TOOMANARG
>>
>> Too many arguments (ERR=89)
>>
>> A function call or a SUB or FUNCTION statement passed more arguments
>> than were expected. Reduce the number of arguments. A SUB or
>> FUNCTION statement can pass a maximum of approximately 32 arguments:
>> a function call can pass a maximum of eight arguments. This error
>> cannot be trapped with a BASIC error handler.
> You can suppress that run-time check (and other heavy-handed BASIC features) with
>
> OPTION INACTIVE=SETUP
>
> In the routine.
But Basic is correct - there are too many arguments
supplied (or too few arguments expected).
It much be better to fix that than to disable the check.
Arne
More information about the Info-vax
mailing list