identifier

Symbol identifying an entity
open 2 entries with the same name
Collection
zero Useful+1
zero
Identifier refers to a symbol used to identify an entity, which has different meanings in different application environments. On the computer programing language In, the identifier is the name used by the user in programming. It is used to give variables constant function , statement blocks, etc. to establish the relationship between name and use. Identifiers usually consist of letters and numbers and other characters.
Chinese name
identifier
Foreign name
identifier
Discipline
software engineering
Definition
A symbol that identifies an entity
Composition
Symbol sequence composed of letters and numbers
Relevant terms
keyword

brief introduction

Announce
edit
stay Programming language Where the identifier is used as program The string that identifies the name of an element in the source program [1] This element can be a statement label, a procedure or function, a data element (such as a scalar variable or an array), or the program itself. Most commonly, the word identifier is used almost synonymously with variable names. In a system in which the position of program data remains unchanged throughout the execution of the program, the identifier used for scalar variables is linked to the memory address, which in turn points to a physical unit in the memory of the machine, which in turn contains a value representation. The intermediate relationship between an identifier and a value is usually transparent to programmers, so in practice, there is confusion between the name of a variable (that is, its identifier) and its value (that is, the current content of the storage unit assigned to the identifier). In most programming languages, identifiers can be formed from any alphanumeric string, and the length is often limited (usually 6 to 8 characters), as long as the leftmost character is a letter. Some languages also allow special characters.

Identifier of programming language

Announce
edit

C language

  1. one
    The identifier consists of letters (A-Z, a-z), numbers (0-9), and the underscore "_". The first character cannot be a number, but can be a letter or an underscore. For example, the correct identifier: abc, a1, prog_to.
  2. two
    Can't C language keyword As a user identifier, such as if, for, while, etc.
  3. three
    The identifier length is determined by the Compiling system It is generally limited to 8 characters (note: the length of 8 characters is limited to C89 standard, and the length of C99 standard has been expanded, but most industrial standards are longer).
  4. four
    Identifiers are case sensitive, that is, they are strictly case sensitive. Generally, variable names are in lower case, and symbolic constants are in upper case.
  5. five
    Identifier naming It shall See the name, know the meaning , for example, length, sum, pi
In C language, identifiers are divided into three categories: keyword Predefined Identifier User defined identifier [2]

C++

  1. one
    The identifier consists of letters, numbers and the underscore "_".
  2. two
    Can't C++keyword As an identifier.
  3. three
    Identifier length is limited to 32 characters.
  4. four
    Identifiers are case sensitive.
  5. five
    first character It can only be letters or underscores, not numbers.

JAVA

  1. one
    The identifier consists of letters, numbers, underscore "_", Chinese characters, and dollar sign "$". The first character cannot be a number.
  2. two
    Can't Java keyword and Reserved word As an identifier.
  3. three
    Identifier has no length limit.
  4. four
    Identifiers are case sensitive.

assembly language

In assembly language, identifiers consist of letters, numbers, and underscores.
In assembly language, the naming rule of identifier is: it is composed of letters (upper and lower case), numbers and underscores, and the first character It must be a letter or underscore, and meaningful instruction symbols or registers cannot be used. 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

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 a special meaning. A single underscore (_foo) indicates that the Class Properties , it needs to be accessed through the interface provided by the class, and cannot be imported with "from xxx import *"; (__foo) starting with double underscore represents the private member of the class; The (__foo__) that starts and ends with a double underscore represents the special identifier for special methods in python, for example, __init__ () represents the Constructor

Delphi

Delphi language It is a Windows application development system based on Object Pascal language. It is used in all event processing and application programs to write program code.
Delphi language identifier is the name used to represent application quantity in Object Pascal language. include: variable (Var)、 constant (Const), Type, Procedure, Method, etc. Identifier is divided into standard identifier and user-defined identifier. Standard identifiers are pre assigned to standard constants, standard types Standard function , standard process and standard document. For example, 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. The object Pascal identifier consists of letters, numbers and underscores, which are specified as follows:
(1) Must start with a letter or underscore;
(2) Cannot be compared with Reserved word Same;
(3) Avoid being the same as the standard identifier already used by Object Pascal.

VB

The first one is English uppercase, lowercase letters or Chinese characters, followed by a number of numbers, English uppercase and lowercase letters (letters are not case sensitive), the underscore '_' or dollar sign '$', and the total length should not exceed 255. In Basic, identifiers are not case sensitive In addition, in computer language, some identifiers are predefined for special purposes, which we call keyword Therefore, the identifier you name cannot be the same as the keyword. Another situation that must be noted is that in the same Scope The same identifier is not allowed to be defined within.
Example of correct identifier: W_absd1234, LLLLl ,ab2cd3ef4 。
In Basic, identifiers are not case sensitive, so LLlll and LLLLl refer to the same identifier, and AB2cd3ef4 and ab2cd3ef4 refer to the same identifier
Example of error identifier: A12@34 Is an incorrect identifier, because the @ character cannot form an identifier; 1234 is a wrong identifier because it does not start with a letter; If is an incorrect identifier because it is a keyword

flash as3

1. In AS3.0, variable , classes, and functions need certain names to distinguish them from each other, and to be applied accurately in programs. These distinguished names with specific meanings are called identifiers.
2. According to the defined places, identifiers are divided into two categories: language built-in identifiers and user-defined identifiers.
Language Built in Identifier: The language built in identifier is defined within 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
(1) All identifiers are case sensitive. (2) First of identifier character It must be English letters (including uppercase or lowercase letters). (3) The identifier shall consist of numbers (0-9), all uppercase letters from "A" to "Z", lowercase letters from "a" to "z", and the underscore "_". (4) It cannot conflict with the built in custom word of AS3.0k. Common Built in Guan Jian Zi
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
Appropriate keyword
each
get
set
namespace
include
dynamic
final
native
override
static
(5) Try to avoid using Reserved word retain keyword
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 error
Legal identifier
Illegal identifier
notes
fromNo12
from#12
# symbol cannot be used in identifier
my_Boolean
my-Boolean
"-" symbol cannot be used in identifier, "_" 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
G.U.I
The '.' delimiter cannot appear inside an identifier
mybreak()
break()
"Break" is a built-in related word and cannot be used for user-defined function names