**************************************** ***************************
Objective: To define an integer
Prototype: integer varname [(subscripts)], varname [(subscripts)],...
Explanation: integer is used to declare variables as type Integer. Variables of type Integer can contain (included) whole numbers with values between-32768 to 32767.
Local variables shocould be declared at the top of a function. Global and module variables must be declared outside of functions.
Example:
Integer A (10) 'single dimension array of Integer
Integer B (10, 10) 'two dimension array of Integer
Integer C (5, 5, 5) 'Three dimension array of Integer
Integer var1, arrayvar (10)
Integer I
**************************************** **************************************** *********
Purpose: To add and modify data.
Prototype: globle [preserve] datatype varname [(subsricpts)], varname [(subsricpts)], ......
Explanation: If it is modified by globle, the data is used in the entire project.
If it is modified by modle, the data is used in the entire program file.
If local is used for modification, the data is used within the function.
(For globle, modle, and local)
Note: You can continue to use preserve for global variables. In this way, the data can be saved ..
Example:
Local variable Declaration
Function main
Integer I
Fend
Variable declaration in the module
Integer m_ I
Function main
Fend
Declaration of all variables (global protection variables)
Globle (preserve) integer g_ I
Function main
Fend
******
Note: I carefully discovered that I used the prefix M _ and G _ When declaring module variables and all variables, which is the basic literacy of excellent programmers.
In this way, when you see the variable, you will know the variable scope and improve the reading experience of the Code.
××××××××××××××××××××××××××××××××××××××××××× *
EPSON robot command set