I am wondering if there is a compiler option which enables to check arguments of call subroutines/functions while compiling (argument numbers or event types). Or maybe a run time tool activated with a flag ? My main purpose is to check if no argument is missing in source lines while calling a subroutine or a function.
Thanks & Best Regards.
Thank you very much for the quick reply.
I tested and compiler is aborting due to an argument type which differs.
Is there a way to skip type checking and only check argument numbers ?
Thanks and Best Regards
Argument type mismatch is just as bad and number of argument mismatches. You really should correct both types of errors.
This said, some older routines may have you passing a scalar (e.g. reference to 1st element of an array), and where the code then subsequently references the dummy scalar with a subscript. You should take the time to clean this up. You may find some hidden errors in your code. It is not unusual to find yourself asking "How did this ever run?".
You do understand that a mismatched type is still an error, yes? And can lead to wrong results if not careful?
You could add, in the routine being called:
!DIR$ ATTRIBUTES NO_ARG_CHECK :: name-of-dummy-argument
This will disable type and shape checking for that one argument.
Better is to correct the program to not have such mismatches.