____ ____ ____ ____ 
||n |||i |||m |||f ||
||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|

	

the nimf guide : characters

This will likely be a short chapter. There is not much to characters in nimf. A character is really just a number representing a unicode code point (which includes the ascii range of characters in their usual numbering). There is a builtin, emit, which will take an integer from the stack and output the character with that number. The following code will output the letter h:


104 emit

That is well and good, but is a little annoying when looking at source code. Wouldn't it be nicer to type the actual character you intend? With a bit of syntactic sugar, you can:


`h emit

A backtick followed by a single character will add the numerical value of that character to the stack. It can then be used for output as a character or operated on as a number. This ability also includes a few escape characters:

That is about all there is to using characters in nimf. Remember that strings are stored as integers representing individual characters like this as well. So if you iterate over a string you can emit the values (which is how many of the various output words are written).