Anonymous user
Enforced immutability: Difference between revisions
Added Dyalect programming language
(Add Swift) |
(Added Dyalect programming language) |
||
Line 267:
STR1 = 'abc'; // regular constant
STR2: string = 'def'; // typed constant</lang>
=={{header|Dyalect}}==
Dyalect supports creation of constants using "const" keyword:
<lang dyalect>const pi = 3.14
const helloWorld = "Hello, world!"</lang>
A constant can contain a value of any type:
<lang dyalect>const sequence = [1,2,3,4,5]</lang>
=={{header|E}}==
|