[Info-vax] VMS internals design, was: Re: BASIC and AST routines
Bill Gunshannon
bill.gunshannon at gmail.com
Thu Dec 2 16:20:06 EST 2021
On 12/2/21 3:43 PM, Dave Froble wrote:
> On 12/2/2021 3:14 PM, Arne Vajhøj wrote:
>> 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
>
> You going to advocate "fixing" that "lack of argument count check" in C
> and other languages too?
>
They did fix it in C. They called it C++. :-)
bill
More information about the Info-vax
mailing list