Author: Xingda Computer technology company (www.study01job.com) Guo Baoli
Variable names should be in accordance with the naming convention, for use frequent or key variables, for readability and modification, the definition should be annotated with its meaning. For example:
String ls_name//Name of the insured person
Variable naming rules are: Variable type + data type + ' _ ' + meaning code
Example:
String instance variable: Is_ variable name;
Date-Type global variable: gd_ variable name;
General variables, with lowercase letters;
Global variable, capitalizing the entire variable name;
Variables: Both are declared in lowercase letters.
Variable Type conventions
The variable type convention is shown in table 1-9.
Variable scope naming convention
The contents of table 20-10 are described below.
A. The naming of global variables must conform to the Gt_subsystemname_detailname format where G is represented as a global variable (Globe), T is a shorthand for data type (DataType): I represents an integer (int), l represents a long integer (length), C Represents a character type (char), and S is a string type (string). Subsystename is an English shorthand for subsystems. Detailname is an English letter with specific meaning. For example: Gs_query_user_info, which defines a string-type global variable for the query subsystem.
B. The naming of local variables must conform to the Lt_detailname format, where L represents a local variable (locally), and T is a shorthand for the data type (DataType): I represents an integer (int), l represents a long integer (a), and C represents a character type (char). s represents a string type. For example: Li_user_salary, which defines an integer local variable.
C. The naming of instance variables must conform to the It_detailname format where I represents an instance variable (Instance), and T is a shorthand for the data type (DataType): I represents an integer (int), l represents a long integer, and C represents a character type (char). s represents a string type. Detailname is an English letter with specific meaning. For example: Is_product_name, a string instance variable is defined.