作业帮 > 英语 > 作业

英语翻译Syntax rules1.Logical expression can be simple logical v

来源:学生作业帮 编辑:拍题作业网作业帮 分类:英语作业 时间:2024/06/02 17:43:01
英语翻译
Syntax rules
1.Logical expression can be simple logical variables or complex logical tests involving variables,constants,functional operators,and logical operators.Both the logical expression and the assignment expression can use any of the numeric or string functions allowed in COMPUTE transformations (see COMPUE and transformation expression) on p.51
2.Parentheses can be used to enclose the logical expression.Parentheses can also be used within the logical expression to specify the order of operations.Extra blanks or parentheses can be used to make the expression easier to read.
3.A relation can compare variables,constants,or more complicated arithmetic expressions.Relations cannot be abbreviated.For example,(A EQ 2 OR A EQ 5) is valid,while (A EQ 2 OR 5) is not.Blanks (not commas) must be used to separate relational operators from the expressions being compared.
4.A relation cannot compare a string variable to a numeric variable,or vice versa.A relation cannot compare the result of the logical functions SYSMIS,MISSING,ANY,or RANGE to a number.
5.String values used in expression must be specified in quotes and must include any leading or trailing blanks.Lowercase letters are considered distinct from uppercase letters.
6.String variables that are used as target variables must already exit.To declare a new string variables,first create the variable with the STRING command and then specify the new variable as the target variable on IF.
句法规则
1.逻辑表达可以是简单逻辑变量或的复杂逻辑测验,后者涉及多变量,常量,功能算子和逻辑算子.逻辑表达和分配表达都可以用任何数字或串计算功能,可以转换(见改造表现compue)p.51
2.应该用圆括号结束逻辑表达.圆括号也能在逻辑表达内使用使操作命令具体化.可以用空白或括号外使表达更容易阅读.
3.一个相关可以比较变量,常量或者更复杂的算术表达.相关式不能缩写.例如,(A EQ 2 OR A EQ 5) 是有效的,而 (A EQ 2 OR 5) 无效.必须用横线(不能用逗号) 隔开要比较的表达式的相关算子.
4.关系式不能比较连续性变量和数字变量,或者三角函数.关系式也不能比较逻辑功能性的结果,SYSMIS,MISSING,ANY,or 区间 to a number.
5.连续性变量表达必须要在引用中具体化,小写字母和大写字母是不相同的.
6.用作目标变量的连续性变量必须是已经存在的.要声明一个连续性变量,首先用STRING 命令创造变量,然后在IF上把新变量具体化为目标变量.