Free Hero Mesh

Artifact [2768d76d56]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

Artifact 2768d76d562a864733decd3016d7970a69a312cb:

Wiki page [Class definition file] by zzo38 on 2018-11-18 23:41:32.
D 2018-11-18T23:41:32.267
L Class\sdefinition\sfile
P 95e0f4f09208e57293f3263a04134a0a8b8be71d
U zzo38
W 2582
The class definition file is a plain text file, which conists of a stream of tokens. Encoding is with [https://en.wikipedia.org/wiki/Code_page_437|PC character set] (a superset of ASCII, although it is recommended to just use ASCII and to escape any non-ASCII characters).

The possible kind of tokens are:
  *  Open: Write <tt>(</tt> to begin a block.
  *  Close: Write <tt>)</tt> to end a block.
  *  Plain name: A plain word without the prefix to indicate what kind (although <tt>,</tt> and <tt>=</tt> prefixes may still be possible). The set of possible plain names is fixed; you cannot define your own.
  *  Number: A 32-bit integer. Can be positive or negative (with <tt>-</tt> prefix), or can be hexadecimal with <tt>0x</tt> at first, or octal with <tt>0o</tt> at first.
  *  String: A quoted string. See also [formatting controls]. Any backslashes and quotation marks must be escaped, and there should not be unescaped line breaks.
  *  Class: A name with <tt>$</tt> at first. Class names are global, are user-defined, and do not need to be declared before they are used (but must still be declared in the same file).
  *  User sound: A name with <tt>!</tt> at first. Must be a sound name in the [Picture file format|.xclass file], without the .WAV suffix.
  *  User local variable: A name with <tt>%</tt> at first. Local variable names are scoped to the definition of a class, and need not ever be declared.
  *  User global variable: A name with <tt>@</tt> at first. Global, and need not be declared.
  *  User message: A name with <tt>#</tt> at first. Global, and need not be declared.
  *  Label: A name with <tt>:</tt> at first. Scoped to the definition of a class. Must exist within that class (although it can be in a different message block) to jump to it.
  *  User function: A name with <tt>&</tt> at first. Global, and must be declared if used.
  *  Key name: A name with <tt>'</tt> at first. You can't define your own; see [Hero Mesh key name] for a list. These are not necessarily bound to the same physical keys that they are named, however.

Also:
  *  Names: All names are case-sensitive. Valid characters include all digits 0 to 9, letters A to Z and a to z, plus, minus, underscore, question mark, period, forward slash, and asterisk.
  *  Prefixes: Many kind of tokens also accept a <tt>=</tt> and/or <tt>,</tt> prefix. These are used as modifiers to indicate the use in a different case.
  *  Comments: Start with <tt>;</tt> (outside of a string literal) and up to the next line break is a comment.
  *  Macros: See [Preprocessor].

Z efa3a06020c9798ce9a513bdf76c073c