Posted by: DavidW
« on: March 31, 2019, 08:00:52 PM »
How straightforward would it be for WEIDU to give a WARNING if you send an argument to a function that isn't actually defined for that function? As in:
DEFINE_ACTION_FUNCTION square_this
INT_VAR input_variable=0
RET value
BEGIN
OUTER_SET value=input_variable * input_variable
END
LAF square_this INT_VAR input=4 RET value END
At present, WEIDU just ignores 'input' and uses the default value for 'input_variable'. In some contexts that leads to annoying silent errors, where it looks as if (e.g.) something's being patched but actually you mistyped the input.
Obviously it would need to require a preamble declaration to avoid breaking backwards compatibility: USE_STRICT_FUNCTIONS or something similar.