Hi,
the exact type doesn't need to be defined for krpano, the action or the operation where a variable will be used defines the type in the most cases...
E.g. even when a variable is a string like "123" it will be possible to use it in a mathematical calculation (similar to JS).
For checking if a variable is a number you could try this:
|
Quellcode
|
1
|
if(var * 1 == var, trace(is a number), trace(is not a number));
|
The multiplication forces a conversion to a number, and for non-numbers this will fail. So when the value is still the same after the multiplication, it is a number.
Best regards,
Klaus