Enforced immutability: Difference between revisions
no edit summary
Puppydrum64 (talk | contribs) (→{{header|68000 Assembly}}: formatting) |
Alextretyak (talk | contribs) No edit summary |
||
Line 4:
Demonstrate any means your language has to prevent the modification of values, or to create objects that cannot be modified after they have been created.
<br><br>
=={{header|11l}}==▼
Prepend V/var keyword with minus sign to make variable immutable:▼
<lang 11l>-V min_size = 10</lang>▼
=={{header|6502 Assembly}}==
Most assemblers allow you to define labels which can refer to constant values for clarity.
Line 25 ⟶ 31:
The CPU isn't aware that these labels exist, however, as the assembler automatically replaces them with the assigned value.
▲=={{header|11l}}==
▲Prepend V/var keyword with minus sign to make variable immutable:
▲<lang 11l>-V min_size = 10</lang>
=={{header|8th}}==
|