Cheddar Documentation
  • Introduction
  • Syntax
  • Literals
    • Comment
    • String
    • Number
    • Array
    • Boolean
  • Mathematics
    • Addition
    • Subtraction
    • Multiplication
    • Division
    • Exponentiation
    • Remainder
    • Negation
    • Sign
    • Root
    • Bitwise AND
    • Bitwise OR
    • Bitwise XOR
    • Bitwise NOT
    • Bitwise Left Shift
    • Bitwise Right Shift
  • Variables
  • Functions
    • Defining
      • Lambda
      • Functionized Operators
      • Functionized Properties
    • Operations
      • Functional Bonding
      • Functional Composition
  • Default Operators
    • What Is
    • Instance-of
    • Actually Is
  • Control Flow
    • Conditional
    • Loops
      • For Loops
      • While Loops
  • Standard Library
    • String
      • Bytes
      • Count
      • Length
      • Match
      • Slice
      • Tail
      • Chars
      • Head
      • Lines
      • Ord
      • Split
      • Test
      • Chunk
      • Index
      • Lower
      • Reverse
      • Substitute
      • Upper
  • Developing
    • Structure
    • Primitive Objects
      • Scope
      • Class
      • Variable
      • Namespace
    • Getting Started
    • API
      • Primitives
        • string
        • number
        • array
        • bool
        • func
        • nil
Powered by GitBook
On this page
  • Strings
  • Numbers
  • Arrays
  • Booleans

Was this helpful?

Literals

The most fundamental of any language are its literals. Cheddar provides the 4 most basic literals:

  • Strings

  • Numbers

  • Booleans

  • Arrays

Additionally Cheddar has functions, interfaces, and more primitives. Classes will be covered in their very own section

Strings

Strings in Cheddar are like most programming languages:

 "Hello, World!"
 'Hello, World!'
 "2 + 2 = #{2+2}"
 '10 + 10 = #{10+10}'

Numbers

Numbers have many features in Cheddar to make them readable and clear:

123
123.456
123_456
0b123

Arrays

Arrays in Cheddar are like most other languages:

 [1,2,3]
 ["foo", "bar", "baz"]

Booleans

Booleans are either:

 true
 false
PreviousSyntaxNextComment

Last updated 4 years ago

Was this helpful?