runtime -> compilation time

This commit is contained in:
PavelVozenilek 2014-06-22 12:35:47 +02:00
commit 538e95e657

View file

@ -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.