
// Fragment #1
local.vLargerValue = local.vValue1
IF(local.vValue2 > local.vValue1)
{
local.vLargerValue = local.vValue2
}
// Fragment #2
local.vLargerValue = Math.Max(local.vValue1, local.vValue2)
Note:
local.vLargerValue – the variable calculated to be the larger of local variables vValue1 and vValue2.
Fragment #2 will yield exactly the same result as Fragment #1.
// Fragment #1
local.vAbsValue = local.vValue
IF(local.vValue < 0)
{
local.vAbsValue = 0 - local.vValue
}
// Fragment #2
local.vAbsValue = Math.Abs(local.vValue)
Note:
local.vAbsValue – the variable calculated to be the positive value of local.Value.
Fragment #2 will yield exactly the same result as Fragment #1.
local.vStr = "";
local.vInt = 0;
WHILE(local.vInt < 10)
{
local.vStr = local.vStr & Math.Power(2, local.vInt) & ", ";
local.vInt = local.vInt + 1;
}
edtOutput = local.vStr;
Will produce the output "1.00, 2.00, 4.00, 8.00, 16.00, 32.00, 64.00, 128.00, 256.00, 512.00, " in output edit control.