Numbers can be expressed in different 4 bases in Brass:
| Base | Prefix | Postfix | Example |
|---|---|---|---|
| Hexadecimal (16) | $ | h | $FA or 9D94h |
| Decimal (10) | d | 230 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.
There are two types of constant;
There are a number of escape sequences you can use:
| Sequence | Meaning |
|---|---|
| \n | Newline |
| \r | Carriage return |
| \b | Backspace |
| \t | Tab |
| \f | Formfeed |
| \\ | 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.