Validation code is like this: CHECK$METHOD$ARGUMENT$LIST is called in register_function, register_procedure, and external$function This is called after a type is read.
#IFADIM !1 //Make sure it has no specified dimension size #SPUSH #DIMSTRIP !1 #IFSAME !$ 0 |CI0 CHECK$METHOD$ARGUMENT$LIST$FOR$ID !2 !3 !4 !5 !6 !7 !8 !9 #ELSE CHECK$ARGUMENT$LIST$ERROR10 #ENDIF #SPOP #ELSE #IFSAME !1 BYREF CHECK$METHOD$ARGUMENT$LIST$FOR$ID2 !2 !3 !4 !5 !6 !7 !8 !9 #ELSE CHECK$METHOD$ARGUMENT$LIST$FOR$ID2 !1 !2 !3 !4 !5 !6 !7 !8 !9 #ENDIF #ENDIF