Numeric Constants

Numbers can be expressed in different 4 bases in Brass:

BasePrefixPostfixExample
Hexadecimal (16)$h$FA or 9D94h
Decimal (10)d230 or 45d
Octal (8)@o@023 or 777o
Binary (2)%b%01010101 or 1111b

Labels can hold floating-point values. You must use decimal for this, and the decimal point '.' regardless of OS localisation.

Character or String Constants

There are two types of constant;

There are a number of escape sequences you can use:

SequenceMeaning
\nNewline
\rCarriage return
\bBackspace
\tTab
\fFormfeed
\\Backslash
\'Single quote
\"Double quote

Note that when using character constants you should not escape the double quote symbol and when using string quotes you should not escape the single quote symbol.