Next: layout bitfid immediate specials, Previous: layout bitfid immediate booleans, Up: layout bitfid immediate [Contents][Index]
The representation in machine words uses the least significant byte as tag:
00000000 00000000 00000000 00001010 value=#\nul C_make_character('\0') 00000000 00000000 01000001 00001010 value=#\A C_make_character('A')
Characters do not make full use of the available bits, because the lower byte’s high nibble is
always 0000
. This means that only 24 bits are available for representing the character on
32-bit platforms; luckily, this is enough for representing the full Unicode range. If Unicode ever
starts using up a bigger code space, we can always sneak in 4 more bits.
The preprocessor macro C_make_character()
is defined in the header file chicken.h.
Next: layout bitfid immediate specials, Previous: layout bitfid immediate booleans, Up: layout bitfid immediate [Contents][Index]