assert builtin
assert(condition[,message])
Fails with a diagnostic unless the condition holds; the message is optional.
| Phase | all |
|---|
Example
@tt
log(str(assert(1 + 1 == 2, "math works")))Logs: true
assert builtinassert(condition[,message])
Fails with a diagnostic unless the condition holds; the message is optional.
| Phase | all |
|---|
@tt
log(str(assert(1 + 1 == 2, "math works")))Logs: true