Actionscripting

in my c++ class, we are working with if/then/else statements and was wondering what , if any similarity does the c++ format have with actionscript?
if no similarity, please post the proper way to make an if/then/else statement, for example, in c++ it would look somehwt like…


     if(variable1=random)
          cout<<"Variable One is equal to the random number.";
     else
          cout<<"Variable One is not equal to the random number.";

also how does actionscript handle algebraic equations.
any help is very appreciated

:cyclops:



if(variable1=="random"){
    trace("it equals random");
}else{

trace("it equals something else");
}


havent played with algebra in A/S