Skip to content
Oro Computer logooro
Runtime Silk Virtnosis Blog Docs Contact
Inside
Silk
Overview Learn Docs Spec Wiki
Silk Wiki
Start
  • Silk Wiki
Language
  • Syntax tour
  • Cheat sheet
  • Flow control overview
  • if / else
  • match
  • loop
  • while
  • for loops
  • break
  • continue
  • return
  • Expression statements
  • Blocks and statements
  • Grammar
  • Doc comments
  • Packages, imports, and exports
  • Types
  • Optionals (T?)
  • Mutability (mut)
  • Operators
  • Literals
  • Numeric literals
  • String literals
  • Character literals
  • Boolean literals
  • Duration literals
  • Duration and Instant
  • Aggregate literals (arrays and structs)
  • Structs and impl
  • Struct requirements (#require)
  • Interfaces
  • Enums
  • Errors and assertions
  • Typed errors (error, panic, and T | ErrorType...)
  • Borrow checker (design)
  • Memory model
  • Regions (with)
  • Buffers (Buffer(T)) (design)
  • Concurrency (async, task, await, yield)
  • Function disciplines (pure, async, task)
  • Const Functions (const fn)
  • Generics (monomorphized)
  • Varargs (...args)
  • External declarations (ext)
  • Testing (test)
  • Formal verification (Formal Silk)
  • Dependent types (const parameters) (design)
  • Conventions
Standard library
  • Standard library overview (std::)
  • std:: conventions
  • std:: package structure
  • std::interfaces
  • std::result
  • std::io
  • std::fmt
  • std::strings
  • std::arrays
  • std::vector
  • std::map
  • std::set
  • std::buffer
  • std::bits
  • std::algorithms
  • std::memory
  • std::args
  • std::env
  • std::process
  • std::path
  • std::fs
  • std::json
  • std::toml
  • std::url
  • std::semver
  • std::uuid
  • std::net
  • std::crypto
  • std::tls
  • std::runtime
  • std::task
  • std::sync
  • std::temporal
  • std::formal
Language / Boolean literals

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

PreviousCharacter literals
NextDuration literals
On this page
  • Example
Silk Wiki
© 2026 Oro Computer. Edit this page