Rexx中的注释: 注释以/开始,以*/结尾. 注释可以嵌套 例 1 /REXX execs should begin with a comment*/ 2. Say " Hello!"/ comment may follow instruction * 3. comment may precede instruction * Say" Hello! 4. /A comment may be long, up to 250 characters, and it may span multiple lines * 5. Comments may /* Comments may be nested * /be nested */
Rexx中的注释: ▪ 注释以/*开始,以*/结尾. ▪ 注释可以嵌套. ▪ 例: ▪ 1. /* REXX execs should begin with a comment */ ▪ 2. Say “Hello!” /* comment may follow instruction */ ▪ 3. /* comment may precede instruction */ Say “Hello!” ▪ 4. /* A comment may be long, up to 250 characters, and it may span multiple lines */ ▪ 5. /* Comments may /* Comments may be nested */ be nested */
继续和缩排 短指令可以用“;”分开: a=℃at;b=Dog;C=17 长指令可以用“,”分行: sentence=“ The quick brown fox”, jumps over the lazy dog REXX不支持缩排: fa=b then Say"a and b are equal Else Say"a and b are not equal
继续和缩排 ▪ 短指令可以用“;”分开: a = ‘Cat’; b = ‘Dog’; c = 17 ▪ 长指令可以用“,”分行: sentence = “The quick brown fox ”, “jumps over the lazy dog.” ▪ REXX不支持缩排: If a = b Then Say “a and b are equal.” Else Say “a and b are not equal
变量 REXX中,变量的命名规则: 最多包含250个字符 可以包含字母,数字和一些特殊字符 (TSO中:@#$!?_.¢) 不能以数字或.开头 变量不用必须声明.REXX中的变量是无类 型划分的,所有的数据都是字符型数据
变量 ▪ REXX中,变量的命名规则: - 最多包含250个字符 - 可以包含字母,数字和一些特殊字符 (TSO中:@ # $ ! ? _ . ¢). - 不能以数字或.开头 ▪ 变量不用必须声明.REXX中的变量是无类 型划分的,所有的数据都是字符型数据.
算术运算 运算符: 指数运算 乘法 /除法 %整除 ∥取余 +加法 减法
算术运算: ▪ 运算符: ** 指数运算 * 乘法 / 除法 % 整除 // 取余 + 加法 - 减法
算术优先规则 ■REXX的通常优先级规则 0圆括号 +,-前缀符号 *指数运算符号 *,,%,∥乘法和除法 +,-加法和减法
算术优先规则: ▪ REXX的通常优先级规则: ▪ () 圆括号 ▪ +, - 前缀符号 ▪ ** 指数运算符号 ▪ *, /, %, // 乘法和除法 ▪ +, - 加法和减法