Menu

Syntax

aditsu

A CJam program is generally composed of:

  • Literals:
    • numbers such as 1, -5.23, 123456789012345678901234567890
    • strings such as "hello"; the backslash character \ can be used for escaping double quotes and backslashes, nothing else
    • characters such as 'a - note the absence of a second single quote; there is no escape character
  • Operators, named with 1 or 2 letters or special characters
  • Variables, which can be any single uppercase letter
  • Blocks, delimited by { and }

Whitespace (spaces, tabs and new lines) can be used to separate tokens, but usually there is no delimiter needed, with a few exceptions (especially numeric literals).


Related

Wiki: Data types and literals
Wiki: Home
Wiki: Operators
Wiki: Variables