Raptor运算符号、函数、子过程介绍大全 联系客服

发布时间 : 星期四 文章Raptor运算符号、函数、子过程介绍大全更新完毕开始阅读bdd3a4fb28ea81c758f57880

Creating Arrays创建数组

使用前必须先创建数组。说明数组的最大顺序(用赋值语句)。 大于最大顺序号时将出现run-time error 例如,先values[7] <- 3 则

1 0 2 0 3 0 4 0 5 0 6 0 7 3 如:values[9] <- 6 则: 1 0 2 0 3 0 4 0 5 0 6 0 7 3 8 0 9 6 对100个数组元素赋初始值0,可以:values[100] <- 0 Creating Two-Dimensional Arrays创建二维数组

numbers[3,4] <- 13。则二维数组 numbers 1 2 3

1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 13 Array Operations数组操作

Length_Of

Length_Of is a function that takes one argument, a one-dimensional array without any index or square brackets after the name. It returns the highest index (which is also the number of elements) defined for the array. Length_Of can also be used to determine the length of a string expression.

例:Length_Of(Scores) will return 4.

Scores

1 87 2 93 3 77 4 82 Raptor Reference

Math

数学运算符 - 负号unary minus ^ , ** 指数运算exponentiation * 乘法multiplication / 除法division rem, mod 求余remainder + 加法addition - 减法subtraction Basic Math Functions基本函数运算 abs 绝对值

ceiling (round up)取上界

e – 返回自然对数值 (base for natural logarithms) floor – 取下界(round down) log – 求自然对数 max – 求最大值 min – 求最小值

pi – pi值

powermod - used for public key encryption / decryption random - [0.0,1.0)间随机数 sqrt – 平方根

Trigonometric Functions三角函数 arccos - arc cosine arccot - arc cotangent arcsin - arc sine arctan - arc tangent cos - cosine cot - cotangent sin - sine tan - tangent

Program Control

Relational Operators = equal to > greater than < less than != not equal to /= not equal to

>= greater than or equal to <= less than or equal to Boolean Operators and – 与运算 not – 非运算 or – 或运算

xor – 异或运算'xor' (true if expressions on either side are different)

clear_console – 清除主控制台信息 delay_for – 等待若干秒

Raptor Graphics

Available colors可用色

Black, Blue, Green, Cyan, Red, Magenta, Brown,Light_Gray, Dark_Gray, Light_Blue, Light_Green, Light_Cyan, Light_Red, Light_Magenta, Yellow, White

Available fill values可用填充 Filled, Unfilled True, False Yes, No

Mouse button values鼠标值

Left_Button , Right_Button,

RaptorGraph Functions (return a value)图函数

Closest_Color, Get_Font_Height, Get_Font_Width, Get_Key, Get_Key_String, Get_Max_Height, Get_Max_Width, Get_Mouse_X, Get_Mouse_Y, Get_Pixel, Get_Window_Height, Get_Window_Width, Is_Open, Key_Down, Key_Hit, Mouse_Button_Down, Mouse_Button_Pressed, Mouse_Button_Released, Random_Color, Random_Extended_Color RaptorGraph Calls图过程

Clear_Window, Close_Graph_Window, Display_Text, Display_Number, Draw_Arc, Draw_Box, Draw_Bitmap, Draw_Circle, Draw_Ellipse,

Draw_Ellipse_Rotate, Draw_Line , Flood_Fill, Freeze_Graph_Window, Load_Bitmap, Open_Graph_Window, Wait_For_Key, Wait_For_Mouse_Button, Get_Mouse_Button, Put_Pixel, Set_Font_Size, Set_Window_Title, Unfreeze_Graph_Window, Update_Graph_Window

Arrays

Array Operations

Length_Of – 返回数组长度 [ ] - indexing: 顺序

To_Character – 返回指定数的ASCII值 To_ASCII – 为指定字符赋予ASCII值

Strings

String Operations + - Concatenation

Length_Of – 返回字符串长度 [ ] - indexing:顺序

Variable Type Queries

Boolean Functions

Is_Array, Is_Number, Is_String, Is_2D_Array

Sound

Sound Calls

Play_Sound, Play_Sound_Background, Play_Sound_Background_Loop

Files

File Calls

Redirect_Input - 以某文件中数据作为输入 Redirect_Output – 将值输出到某文件。