Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
i know the difference between Let & Set keywords.but i have a scenario where in i have defined a variable using Set Keword but i waant to evaluate the string in that variable. How this can be achieved?
Hi,
Like this.?
SET v1 = '4+5';
LET v2 = Evaluate(v1);
Dollar expand it: LET vMySecondVar = $(vMyFirstVar);
... or even simpler: Don't dollar-expand it.
Let vMySecondVar = vMyFirstVar;
HIC
Set vMyFirstVar = 5+6;
Let vMySecondVar = vMyFirstVar;
vMySecondVar doesn't seem to evaluate the string, it returns the string as it is.
In that case vMySecondVar would required to be dollar-expanded, right?
You're right. I missed that. Evaluate or dollar expansion will both store 9 in the second variable, whereas the plain Let will store 4+5.
HIC