Page 1 of 1

Variable Multiplication

Posted: 29 Jul 2020 03:10
by JC.INTERNET.STUFF
Hi,

I receive the error: "can not apply operation * to values '7.00000000000145E-5' and '20,000' (Expression: Spread * Size[line 0])

....when variables Spread and Size are multiplied.

Please advise.

Thanks.

Julian.

Re: Variable Multiplication

Posted: 29 Jul 2020 09:35
by Hit

Here is your code (I presume):

Spread = "7.00000000000145E-5";
Size = "20,000";
Wrong = Spread*Size;
______________________________________________________________
Here is the right ones:

Spread = "7.00000000000145E-5";
Size = "20000";
Right = Spread*Size;

I think you used Strings as numbers. You should delete the comma in expression:
Size = "20,000";
______________________________________________________________
What you should write:

Spread = 7.00000000000145E-5;
Size = 20000;
Right = Spread*Size;

Note that number in Automagic cannot contains white space.