Operators

Arithmetic Operators

Standard follows the order of operation (PEMDAS) and supports all arithmetic operators. Standard does not have rounding issues like Java. Since Standard does not use = for settinv values, arithmetic operations and concatenation must take place inside parenthesis.

    
    radius 7
    circ (3.14159 * radius ^ 2)
    print circ #prints circumference given radius
    

Modulo

Modules work in Standard as you would expect.

    
    dividend (65 % 5)
    print dividend #prints 0
    

String Operations

You can concatenate strings using . and this should be used to concatenate. You may use +; however, if the string contains only numbers, it will attempt to add them.

    
    #Input firstname and say hello!
    in firstname "What is your name?"
    print ("Hello ".firstname)

    #Prints out 12
    print ("5" + "7")

    #prints "5Hello"
    print ("5" + "Hello")
    

Formatting Strings