What Is a System Identifier?
Identifier refers to a symbol used to identify an entity, which has different meanings in different application environments. In computer programming languages, identifiers are names used by users when programming, and are used to name variables, constants, functions, statement blocks, etc., to establish the relationship between names and use. Identifiers usually consist of letters and numbers and other characters.
in
C Identifier C
The identifier consists of letters (AZ, az), numbers (0-9), underscore "_", and the first character cannot be a number, but can be a letter or an underscore. For example, the correct identifiers: abc, a1, prog_to.
C language keywords cannot be used as user identifiers, such as if, for, while, etc.
The length of the identifier is determined by the compilation system on the machine. The general limit is 8 characters (Note: The 8-character length limit is the C89 standard, the C99 standard has been extended, in fact, most industrial standards are longer)
Identifiers are case sensitive, which means they are case sensitive. Generally use lowercase for variable names and uppercase for symbolic constant names.
Identifier naming should be " see the name " , for example, length (length), sum, total (sum), pi (pi) ...
C language divides identifiers into three categories: keywords, predefined identifiers, and user-defined identifiers [2] .
C++ Identifier C ++
The identifier consists of letters, numbers, and underscores "_".
C ++ keywords cannot be used as identifiers.
Identifier length is limited to 32 characters.
Identifiers are case sensitive.
The first character can only be a letter or an underscore, not a number.
JAVA Identifier JAVA
The identifier consists of letters, numbers, underscores "_", Chinese characters, and the dollar sign "$". The first character cannot be a number.
Java keywords and reserved words cannot be used as identifiers.
Identifiers have no length limit.
Identifiers are case sensitive.
Identifier assembly language
In assembly language, identifiers consist of letters, numbers, and underscores.
In assembly language, the naming rules of identifiers are: letters (uppercase and lowercase), numbers, and underscores. The first character must be a letter or an underscore. You cannot use meaningful instruction symbols or registers. In assembly language, capital letters are generally used.
The following identifier names are legal:
year, Day, ATOK, X, _ CWS, HAO
The following identifier names are illegal:
# 123, .COM, $ 100, 1996Y, 1_2_3, Win3.2, LOOP, AX
python Identifier python
In Python, identifiers consist of letters, numbers, and underscores.
In python, all identifiers can include English, numbers, and underscores (_), but cannot start with a number. Identifiers in Python are case sensitive.
Identifiers that begin with an underscore have special meaning. Class attributes that start with a single underscore (_foo) cannot be directly accessed, and need to be accessed through the interface provided by the class, and cannot be imported with "from xxx import *"; (__foo) that starts with a double underscore represents a private member of the class; The double underscores (__foo__) represent special identifiers for special methods in Python, such as __init __ () for constructors of classes.
Delphi Identifier Delphi
Delphi language is a Windows application development system based on Object Pascal language. It is used to write program code in all event processing procedures and applications.
The Delphi language identifier is the name used in Object Pascal language to indicate the amount of applications. Including: Variable (Var), Constant (Const), Type (Type), Procedure (Procedure), Method (Method), etc. Identifiers are classified into standard identifiers and custom identifiers. Standard identifiers are identifiers pre-assigned by the Object Pascal language system to standard constants, standard types, standard functions, standard procedures, and standard files. Such as standard constants: False, True; standard types: integer, char, real; standard functions: Abs, Sqr, Cos, etc. Custom identifiers are constants, variables, types, functions, procedures, and program names that programmers define for themselves as needed. Object Pascal identifiers consist of letters, numbers, and underscores, which are specified as:
(1) Must begin with a letter or underline;
(2) Cannot be the same as reserved words;
(3) Avoid the same as the standard identifier already used by Object Pascal.
VB Identifier VB
The first is an English uppercase or lowercase letter or Chinese character, followed by several numbers, English uppercase and lowercase letters (letters are not case sensitive), underscore '_' or dollar sign '$', and the total length must not exceed 255. Identifiers are not case sensitive in Basic . In addition, some identifiers are predefined in computer languages for special purposes. We call them keywords, so the identifier you name cannot be the same as a keyword. It is also important to note that it is not allowed to define the same identifier in the same scope.
Examples of correct identifiers: W_absd1234, LLLLl, ab2cd3ef4.
In Basic language, identifiers are not case sensitive, so LLllll and LLLLl refer to the same identifier, AB2cd3ef4 and ab2cd3ef4 refer to the same identifier
Examples of incorrect identifiers: A12 @ 34 is an incorrect identifier because the character @ cannot form an identifier; 1234 is an incorrect identifier because it does not start with a letter; if is an incorrect identifier because it is a Keywords.
flash as3 Identifier flash as3
1. In AS3.0, variables, classes, and functions all need a certain name to distinguish them from each other, and they are applied accurately in the program. These special names with specific meanings are called identifiers.
2. According to the defined place, identifiers are divided into two categories: language built-in identifiers and user-defined identifiers.
Language built-in identifiers: Language built-in identifiers are defined inside the language.
User-defined identifier: The name created by the user is the user-defined identifier.
The technical restrictions on identifiers in AS3.0 mainly include the following points
(1) All identifiers are case sensitive. (2) The first character of the identifier must be English letters (including uppercase or lowercase). (3) The identifier should consist of numbers (0-9), all uppercase letters from "A" to "Z", lowercase letters from "a" to "z", and underscore "_". (4) Cannot conflict with the built-in Guanjian word of AS3.0k. Common built-in keywords
as | break | case |
catch | class | const |
continue | default | delete |
do | else | extends |
typeof | finally | for |
function | if | implements |
import | in | instanceof |
interface | internal | is |
native | new | null |
package | private | protected |
public | return | super |
switch | this | throw |
to | true | try |
use | var | void |
while | with | false |
Keywords that should be avoided
each | get | set |
namespace | include | dynamic |
final | native | override |
static | | |
(5) Try to avoid reserved keywords
abstract | boolean | byte |
cast | char | debugger |
double | enum | export |
float | goto | intrinsic |
long | prototype | short |
synchronized | throws | to |
transient | type | virtual |
volatile | dim | mx |
Common identifier naming errors
Legal identifier | Illegal identifier | Comment |
fromNo12 | from # 12 | # Symbol cannot be used in identifiers |
my_Boolean | my-Boolean | "-" Cannot be used in identifiers, "_" should be used instead |
Obj2 | 2ndObj | Identifier cannot start with a number |
myclass | class | "Class" is a built-in keyword |
jack_rose | jack & rose | The symbol "&" cannot be used in identifiers |
GUI | GUI | The "." Separator cannot appear inside the identifier |
mybreak () | break () | "Break" is a built-in keyword that cannot be used for custom function names |