In this section: |
Reference: |
This section describes the types of expressions that you can write in Maintain Data:
COMPUTE Bonus = Curr_Sal * 0.05 ;
A numeric expression returns a numeric value. For details, see Writing Numeric Expressions.
COMPUTE Delivery/MDY = ShipDate + 5 ;
There are two types of date expressions:
COMPUTE First_Init/A1 = MASK (First_Name, '9$$$$$$$$$') ;
A character expression returns a character value. For details, see Writing Character Expressions.
When you use an expression to assign a value to a variable, make sure that you give the variable a format that is consistent with the value returned by the expression. For example, if you use a character expression to concatenate a first name and last name and assign it to the variable FullName, make sure you define the variable as character (that is, as alphanumeric or text).