Raptor 运算符号、函数、子过程介绍大全 Raptor symbols 符号(六个) The six symbols used in Raptor are displayed in the Symbol Window in the upper left corner of the main window: 赋值Assignment x <- x + 1 用Set x to x+1 调用Call 及subcharts graphics routines and other instructor-provided procedures 及subcharts 输入Input 输出Output 分支Selection 循环Loop Control Math in Raptor(数学运算符) Unary Minus ( - )负号 例如,x 值分别为7,-3,3,则-x 的值为-7;-x 的值为3,---x 值为-3 Exponentiation ( ^ or ** )指数运算 2^3 的值为8;-3**2 的值为9 ( =(-3)*(-3) ) * , / , REM, MOD——乘、除、取余函数 floor ( 5 / 2 )——整除函数?=2 x y x REM y x MOD y 10 3 1 1 37 2 1 1 16 2 0 0 9.5 3 0.5 0.5 9.5 2.5 2 2 -10 3 -1 2 10 -3 1 -2 常用于判断某数是否奇偶数 注:三种除运算除数均不可为0,否则将显示“run-time error” + , - 加减运算 非三角函数 In Assignments: x_magnitude <- abs(x) product <- e^(log(factor1) + log(factor2)) In Select and Loop Exit Comparisons: log(x) > 0.0 sqrt(c^2) <= sqrt(a^2 + b^2) random > 0.5 and abs(x) < 100.0 以字母顺序列出非三角函数: 求绝对值 ABS 例如 abs(-3.7) 为 3.7 CEILING(与 FLOOR 相对) ceiling(math_expression) 例如 ceiling(15.9) 为 16, ceiling(3.1) 为 4, ceiling(-4.1) 为-4 FLOOR variable <- floor(math_expression) floor(15.9) is 15, floor(-4.1) is -5 E 指数幂 e^x e 为约等于 2.7 的对数常数 LOG 对数 log(math_expression) 参数不可为 0,否则 run-time error MAX max(math_expression, max_expression) 例如:max(5,7) 为 7. MIN min(math_expression, max_expression) 例如:min(5,7) 为 5. PI 返回圆周率值 3.14159. POWERMOD powermod(base, exp, modulus) 返回值为 ((base^exp) mod modulus). RSA public key encryption and decryption bases and exponents too large for the Raptor exponentiation operator can still be used for encryption. RAN...
Raptor 运算符号、函数、子过程介绍大全 Raptor symbols 符号(六个) The six symbols used in Raptor are displayed in the Symbol Window in the upper left corner of the main window: 赋值Assignment x