runtime -> compilation time
This commit is contained in:
parent
e903e64461
commit
538e95e657
1 changed files with 2 additions and 2 deletions
|
|
@ -11,7 +11,7 @@ proc getAlphabet(): string =
|
|||
for letter in 'a'..'z':
|
||||
result.add(letter)
|
||||
|
||||
# Computed at runtime
|
||||
# Computed at compilation time
|
||||
const alphabet = getAlphabet()
|
||||
|
||||
# Mutable variables
|
||||
|
|
@ -57,4 +57,4 @@ A `const` variable's value will be evaluated at compile-time, so if you inspect
|
|||
STRING_LITERAL(TMP129, "abcdefghijklmnopqrstuvwxyz", 26);
|
||||
```
|
||||
|
||||
The only limitation with const is that compile-time evaluation cannot interface with C because there is no compile-time foreign function interface at this time.
|
||||
The only limitation with const is that compile-time evaluation cannot interface with C because there is no compile-time foreign function interface at this time.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue