Next: Calling functions
Previous: Function declarations
Inside a NASL function, named arguments are just accessed as any local
variable. Unnamed arguments are
implemented through the special array _FCT_ANON_ARGS15. This variable will be NULL in interpretors below NASL_LEVEL
2190. You may put this at the start of scripts that need this function:
- if (NASL_LEVEL < 2190) exit(0); # _FCT_ANON_ARGS is not implemented
- Writing to _FCT_ANON_ARGS is undefined. Currently, the memory is
wasted but the value cannot be read back.
- Using _FCT_ANON_ARGS to try to read named arguments is bad too.
Currently, there is a protection and a NULL value is returned.