Skip to content

7 Mathematical Expressions ​

Expressions share a common syntax each place they appear in PSPP commands. Expressions are made up of operands , which can be numbers, strings, or variable names, separated by operators. There are five types of operators: grouping, arithmetic, logical, relational, and functions.

Every operator takes one or more operands as input and yields exactly one result as output. Depending on the operator, operands accept strings or numbers as operands. With few exceptions, operands may be full-fledged expressions in themselves.

• Boolean ValuesBoolean values
• Missing Values in ExpressionsUsing missing values in expressions
• Grouping Operatorsparentheses
• Arithmetic Operatorsadd sub mul div pow
• Logical OperatorsAND NOT OR
• Relational OperatorsEQ GE GT LE LT NE
• FunctionsMore-sophisticated operators
• Order of OperationsOperator precedence

基于 GNU PSPP 2.0.1 手册与入门教程整理