Anonymous user
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:
:– it is mainly a case insensitive language;
:– but keywords are all in lowercase;
:– and the first letter of an identifier is case sensitive;
:– 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}}==
|