Skip to content

Integers, Floats, Characters, and Booleans

Xanderplayz16 edited this page Jun 30, 2022 · 4 revisions

These four primitive types, described in more detail here, form the foundation of cish.

Integers and Floats

Integer declarations are composed of alphanumeric strings with no decimal dots, such as:

  • 69
  • 7734206
  • 8008
  • 16h Hexadecimal values are trailed by an h.
  • 69.69 Floats are declared with alphanumeric strings with a decimal dot:
  • 69f Moreover, in order to force a whole number to be parsed as an float instead of an integer, simply append an f flag:
  • 8008132f

Characters

Superforth only supports byte sized characters, so wide encodings like UTF-16 wouldn't work. ASCII or UTF-8 ought to work though.

  • 'a'
  • 'b'
  • 'c'

Booleans

Always two there are: true or ```false. No more, no less.