Use this macro to check inside a besFUNCTION that the function was called as a sub and not command. If the include file declares the function as
declare command XXX alias "xxx" lib "library"
declare sub XXX alias "xxx" lib "library"
then you can not execute the rest of the code safely. This macro returns with the error code COMMAND_ERROR_BAD_CALL if the function was declared the wrong way.