Jump to content
Sign in to follow this  
Phaethon

Solve a simple addition problem

Recommended Posts

Hey everyone, it is me again. I need a little bit of help.

If I have a variable coming back like this:

$MyVar = 2+2

How do I solve the math inside the variable thus changing the variable to the sum (in this case, $MyVar = 4) so that I can use it elsewhere.

Help is very appreciated as usual :)


Coder's Helper >> Here[center][/center]

Share this post


Link to post
Share on other sites

$MyVar = 2+2

How do I solve the math inside the variable thus changing the variable to the sum (in this case, $MyVar = 4) so that I can use it elsewhere.

I think you are looking for this:

$a = '1'
$b = '2'
$MyVar = $a+$b 
MsgBox(0,"",$MyVar)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...