Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a simple variable defined name vSample with a value of 5.
If i want to display the variable, I had always used $(vSample), but today when i tried simply =vSample in a text box it still gives me the value of 5. So what exactly is the utility of $ sign expansion. Kindly explain.
Thanks,
Nath
Hi,
For values like 5, you don't need to use $ sign in the expressions, but when you use 4 + 4 as definition for variable then you have to use =$(vSample), then only it will evaluate the expression otherwise it simply returns 4 + 4 as a string.
Simple, if you give $, it is LET, if you just give vSimple it works as SET.
From Help file
Set x=3+4;
Let y=3+4;
z=$(y)+1;
vSample : 4 + 4 (In Variable Overview)
$(x) will be evaluated as '3+4 '
$(y) will be evaluated as '7'
$(z) will be evaluated as '8'
vSample = 4 + 4
$(vSample) = 8
Hope this helps you.
Regards,
Jagan.
It is best practice to use $(). It is used to calculate the variable. So if vSample was 4+4 =vSample would yield 4+4 and =$(vSample) would yield 8.
Hi,
For values like 5, you don't need to use $ sign in the expressions, but when you use 4 + 4 as definition for variable then you have to use =$(vSample), then only it will evaluate the expression otherwise it simply returns 4 + 4 as a string.
Simple, if you give $, it is LET, if you just give vSimple it works as SET.
From Help file
Set x=3+4;
Let y=3+4;
z=$(y)+1;
vSample : 4 + 4 (In Variable Overview)
$(x) will be evaluated as '3+4 '
$(y) will be evaluated as '7'
$(z) will be evaluated as '8'
vSample = 4 + 4
$(vSample) = 8
Hope this helps you.
Regards,
Jagan.
Hi,
we can use droller expansion to form dynamic expressions also apart from evaluating expressions.
Regards,
Abhishek