Case-sensitivity of identifiers: Difference between revisions

Totally rewritten as the provided example was no longer valid.
(Add Plain English)
(Totally rewritten as the provided example was no longer valid.)
Line 978:
 
=={{header|Nim}}==
Nim has peculiar rules regarding case and style sensitivity:
<lang Nim>var dog = "Benjamin"
:– it is mainly a case insensitive language;
Dog = "Samba"
:– but keywords are all in lowercase;
DOG = "Bernie"
:– and the first letter of an identifier is case sensitive;
echo("There is just one dog named " & doG)</lang>
:– moreover, underline is ignored in identifiers (style insensitivity).
 
<lang Nim># The guidelines suggest that type identifiers begin by an uppercase letter.
type Coordinates = tuple[x, y: float]
 
# The guidelines suggest that variable identifiers start by a lowercase letter.
var coordinates: Coordinates # No problem, the identifiers differ by their first letter.
 
var x_y: COORDINATES # COORDINATES is the same as Coordinates.
xy = (2, 3) # Same as x_y.
echo xY # Also same as x_y.</lang>
 
=={{header|Oberon-2}}==
Anonymous user