You are not logged in.

panoyun

Intermediate

  • "panoyun" started this thread

Posts: 234

Location: Somalia

  • Send private message

1

Saturday, February 29th 2020, 3:26am

$variable how to use?

I didn't find anything about this document

$variable


https://krpano.com/docu/actions/#expressions.type

2

Wednesday, March 4th 2020, 6:18pm

Hi,

e.g. when defining a variable like this:

Source code

1
set(text, 123);
or explicitly like this:

Source code

1
def(text, string, 123);
it will be a String internally.

But when doing an mathematical expression, then krpano interprets that String as Number
and the result of such call:

Source code

1
trace(calc(1 + text));
will be

Source code

1
124
( = 1 + 123)

And when using $variable that Interpretation will be avoided, then the variable will be used as String,
so this call:

Source code

1
trace(calc(1 + $text));
will be result in

Source code

1
1123
( = 1 + "123")

Best regards,
Klaus

panoyun

Intermediate

  • "panoyun" started this thread

Posts: 234

Location: Somalia

  • Send private message

3

Thursday, March 5th 2020, 3:17pm

thank you
Klaus
Thank you very much for your detailed answer
Love you
*thumbsup*