Boolean literals
Silk has the boolean type bool with literals true and false.
Full reference: literals boolean.
Example#
fn main () -> int {
let ok: bool = true;
if ok && !false {
return 0;
}
return 1;
}
Source repository · Edit this page · View Markdown