算术优先规则 例 Say7*3+4Say2*3*2 nSay7+3*4Say2*③3*2) Say7-3+4Say-5+6 Say7+3-4Say-5+6*2 Say3*2Say-(5+6)*2
算术优先规则: ▪ 例: ▪ Say 7 * 3 + 4 Say 2 ** 3 ** 2 ▪ Say 7 + 3 * 4 Say 2 ** (3 ** 2) ▪ Say 7 – 3 + 4 Say -5 + 6 ▪ Say 7 + 3 – 4 Say -5 + 6 * 2 ▪ Say 3 ** 2 Say –(5 + 6) * 2
Say指令 语法: Say expression 每个Say指令显示一行输出 例 say"Helo,word.” Say25*(9/3) Say The answer is: num1+ num2 Say Say
Say指令: ▪ 语法: Say expression ▪ 每个Say指令显示一行输出. ▪ 例: Say “Hello, world.” Say 25 * (9 / 3) Say “The answer is:” num1 + num2 Say Say ‘’
Parse指 语法: Parse source variabletemplate Where source is the input source of the data to be parsed, and variabletemplate are the rules for parsing that data, and the variables to which the data parts will be assigned
Parse指令 语法: Parse source variabletemplate Where source is the input source of the data to be parsed, and variabletemplate are the rules for parsing that data,and the variables to which the data parts will be assigned
从键盘读( Parse Pul) 语法: Parse Upper Pull variabletemplate or Pull variabletemplate variabletemplate是变量名的列表 在给模板中的变量赋值前,将输入数据自动 转换成大写形式
从键盘读(Parse Pull) ▪ 语法: Parse Upper Pull variabletemplate - or – Pull variabletemplate variabletemplate是变量名的列表. 在给模板中的变量赋值前,将输入数据自动 转换成大写形式
例 / REXX sample * Say Please enter your name Parse Upper Pull name say"Helo"nam?e” Say Enter 2 numbers Parse Upper Pull numa numb Say You entered these numbers: numa" numb 如果保留输入数据的大小写形式,则删除关键字 Upper Parse Pull variabletemplate
例: /* REXX sample */ Say “Please enter your name:” Parse Upper Pull name Say “Hello” name”.” Say “Enter 2 numbers:” Parse Upper Pull numa numb Say “You entered these numbers:” numa “and” numb 如果保留输入数据的大小写形式,则删除关键字Upper: Parse Pull variabletemplate