String Modes


In the latest release, the Octo assembler has grown new language features: support for quoted string literals and a new kind of macro facility, :stringmode, for working with them. From the additions to the Octo MetaProgramming Cookbook:

A stringmode is a special type of macro which can be invoked for every character in a string literal in sequence. Defining a string mode uses :stringmode, followed by a name, an alphabet, and a macro body enclosed in curly braces ({}). 

The language manual has additional information.

I've also updated some example programs to take advantage of this feature. Give it a spin, and let me know what you think!

Get Octo

Leave a comment

Log in with itch.io to leave a comment.