Hi,
right, there are two different 'calc' cases:
- one is a normal action call
|
Quellcode
|
1
|
calc(result, expression);
|
- and the other is special case to evalute an expression before passing its result to an action:
|
Quellcode
|
1
|
someaction( calc(expression) );
|
I have tried showing that also here in the documentation:
https://krpano.com/docu/actions/#calc
That parser of the action calls doesn't know it in advance if an action might get a callback string or just a normal parameter and because the parameters are type-less it can't differ between action-calls and strings. And further the parsing of the given parameters of an action happens in a later parsing step, so it can't count the number of the parameters in advance to differ between both cases.
That means an action( calc(...) ) call always results in the second case, but when ending the calc with ';' or adding other actions to the call, it is not longer a valid get/calc parameter call and the parameters is handled as normal string parameter.
That also means a calc(dest, expression) doesn't 'always' requires a terminating semicolon, but it would require one, when using that in a parameter of another action call.
I will try adding that case a special note in the documentation.
Best regards,
Klaus