Assignments
The most simple expressions are simple assignments of literal values to variables. It may help to refer to the documentation on steve types before continuing.
Below are a few examples of this type of expression. In each case, the variable on the left will take the value of the expression on the right. If the expression on the right is not the correct type, it will be automatically converted if possible. If the conversion is not possible, an error will occur.
myInt = 4.
myDouble = 12.345.
myString = "Hello!".
# If we assign a double to an int, it will be automatically converted by
# truncating the decimal portion. In this example, myInt will take the value
# 4:
myInt = 4.8.
# Similarly, if we assign a string to an int or a double, the variable will
# take the numeric value of the string, in accordance with the atoi() or
# atof() ANSI C function. Here the double will get the value 10000:
myDouble = "10000 miles away.".
