The Language of Expressions
Learnin' the Lingo
3 and 5 are operands and * (multiply) is the operator.
x = 10;
This statement would store the value of 10 into the variable named "x". Presumably we would refer to x later in the expression to retrieve the value stored there.
Many expressions in After Effects will consist of multiple "statements". Generally, each statement ends with a semi-colon. Many statements are "assignment" statements where you have a variable name on the left, an equals sign ("="), and then the value that gets plugged into the variable. There are some exceptions that we will cover as we get to them. One significant exception for After Effects is that the last statement of an expression is assumed to be an assignment operation to the property that the expression is written on. (Actually, it's the last statement executed in the expression, which in some cases won't necessarily be the last statement in the expression). This statement does not need to have a variable on the left, it doesn't need to have an assignment operator (=), and it doesn't need to end in a semi-colon. It just needs to have the value (or equation that will generate a value) that is the final result of the expression. For example, you could have this simple expression for Rotation:
After Effects will assume that what you meant is:
rotation = 180;
However, if you want to, you can in fact include a variable, an assignment operator and a semi-colon in the last statement and After Effects will still take the result and plug it into the property that you wrote the expression on. For example, if you had a Rotation expression that looked like this:
x = 10; y = x*18;
After Effects would plug 180 in for the value of Rotation because that was the last result that it calculated.