CraftScript
  • CraftScript
  • Syntax
    • Kinds
    • Keywords
    • Language Features
  • Tutorials
    • Getting Started
      • Assurance Keywords
      • Value Keywords
      • Condition Keywords
      • Other Keywords
    • Using the Language
      • The Do Block
    • Importing External Scripts
    • Adding CraftScript to a Server
    • Environments and Contexts
  • Libraries
    • Reflection
    • Debug
    • Math
    • Parser
    • Global
Powered by GitBook
On this page
  1. Tutorials
  2. Getting Started

Value Keywords

Keywords that produce a constant value.

There are 3 value keywords. These return a constant (literal) value.

True

The keyword true produces a boolean (true) value.

All true values are equal.

bool = true
assert bool == true
assert bool

result = 5 == 5
assert result == true
assert result == bool

False

The keyword false produces a boolean (false) value.

All false values are equal.

bool = false
assert bool == false
assert !bool

result = 5 != 5
assert result == false
assert result == bool

Null

The keyword null produces an empty value.

All empty values are equal.

nothing = null
assert nothing == null

An empty value is printed as "null" in text or interpolation.

PreviousAssurance KeywordsNextCondition Keywords

Last updated 1 year ago