Jump to content

Recommended Posts

Posted (edited)

I have three variables the first 2 contain a number the third one is + or - how would i set up a problem that is

15 + or - 12

variable1 variable3 variable2 = variableanswer

Thanks ahead of time

Edit for the example 15 is var1 +or- is var3 and 12 is var2.

Edited by zipppo
Posted

You can do it this way.

$var1 = 15

$var2 = "-"

$var3 = 12

if $var2 = "+" then

MsgBox(0,"",$var1 + $var3)

else

MsgBox(0,"",$var1 - $var3)

EndIf

MEASURE TWICE - CUT ONCE

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...