Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
what is the difference between set and let?
Both assign values to variables in the script - SET assigns the value to the variable without evaluation, as a string, whereas LET first evaluates the expression on the right of the equals sign, then stores it.
There's a good explanation of it here (see the correct answer) by Miguel: Re: $(#variable) when variable is NULL: general script error, why?
Hi mani,
Set: Creates a variable with a defined string or number, ie: SET vPath = ".\AuxDocs";
Let: Defines a variable that can be evaluated, ie: LET vFile = vPath & '\file.txt'; --> vFile will store .\AuxDocs\file.txt
A very simple example:
If you create two variables in the script:
SET x = 2 + 3;
and
LET y = 2 + 3;
on the front end,
x will be equal to '2+3' and y will be equal to 5.
SET give a value of a String to a variable, i.e:
Set variable = 3*2;
variable = '3*2'
and LET evaluates the expresión on the right of equals sign, i.e:
LET variable = 3*2;
variable = 6
Ger