Variable Multiplication

Post your questions and help other users.

Moderator: Martin

Post Reply
JC.INTERNET.STUFF
Posts: 27
Joined: 13 Jul 2017 08:47

Variable Multiplication

Post by JC.INTERNET.STUFF » 29 Jul 2020 03:10

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.

User avatar
Hit
Posts: 91
Joined: 20 Jan 2020 11:31

Re: Variable Multiplication

Post by Hit » 29 Jul 2020 09:35


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.

Post Reply