Identifiers

Simple identifier

Description

A simple identifier is a unique name for a software element. It starts with a letter, followed by any number of letters (lowercase and uppercase), digits and underscores (_).

Identifiers are case sensitive. For example, first_name is not the same as First_name.

Syntax

Table 4.1. Identifier

ProductionSyntaxLinks
identifier letter ( letter | digit | "_" ) * the section called “Simple identifier”

Examples

Example 4.1. Identifiers

color
last_name
make_delicious_coffee
index_1
URI
XML_file_20

[Note]Note

To increase source code readability it is recommended to use the underscore as word separator in identifiers, instead of capital letters. Example:

this_is_a_rather_long_identifier_but_there_is_no_limit

is easier to read than

ThisIsARatherLongIdentifierButThereIsNoLimit