10.00000\2=10.00200???
echo ${Math.Calc[(10.00\1)]}
echo ${Math.Calc[(10.00\2)]}
is not supposed to be!
Divide (Integer) - X by Y
Moderators: Lavish Software Team, Moderators
-
- GamingTools Subscriber
- Posts: 74
- Joined: Sun Jun 25, 2006 8:29 am
No the issue you are running into is that \ is the escape character. It's not doing a calculation because you're escaping the 1 and the 2 instead of actually dividing. Your two echoes resolve to:
Thus the working-as-intended responses.
To use the integer divide operator, which is also the escape character, use a second \ (escape the divide operator).
Correct syntax:
Code: Select all
echo ${Math.Calc[(10.001)]}
echo ${Math.Calc[(10.002)]}
To use the integer divide operator, which is also the escape character, use a second \ (escape the divide operator).
Correct syntax:
Code: Select all
echo ${Math.Calc[(10.00\\1)]}
echo ${Math.Calc[(10.00\\2)]}