I am having problems with decimal places > 2.
This code:
GetClipBoard>myvalue //myvalue=1.1234
Sub>myvalue,0.01
results in 1.11, which is ok.
This code:
GetClipBoard>myvalue //myvalue=1.1234
Sub>myvalue,0.001
results in 1.12, which is not ok - it is simply chopped off, with no calculation being done.
I have changed my regional settings, but that has made no difference.
Decimal place > 2
Moderators: Dorian (MJT support), JRL
Instead of Sub use:
Let>myvalue=myvalue-0.001
More accurate. Add and Sub commands are there for backwards compatibility but are largely unnecessary now. Use Let for calculations. You can also use complex expressions and VBScript.
Let>myvalue=myvalue-0.001
More accurate. Add and Sub commands are there for backwards compatibility but are largely unnecessary now. Use Let for calculations. You can also use complex expressions and VBScript.
MJT Net Support
[email protected]
[email protected]
Not to be argumentative and certainly not questioning the answer to this particular user but I would like to point out that "Add" and "Sub" work great with dates. "Let" does not work at all.More accurate. Add and Sub commands are there for backwards compatibility but are largely unnecessary now.
For example:
GetDate>var
Add>var,28
Will add 28 days onto today's date. Today is 10/04/2005 so the variable var will be set to 11/01/2005.
On the other hand:
GetDate>var
Let>var=var+28
Will set var to be "var+28"
And adding percents to the variable:
GetDate>var
Let>var=%var%+28
Will result in var being set to "11/04/2005+28"
There may be some way to make "Let" add and subtract numbers from dates by using a complex expression or using VB script, but nothing could be easier than using "Add" and "Sub". These two helpful tools are good for more than backward compatability.
Thanks for listening,
Dick
No, Let cannot add days to dates. Add and Sub have special functionality to add days to dates. Let will do only pure mathematical calculations.
MJT Net Support
[email protected]
[email protected]