Free Hero Mesh

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

Differences From Artifact [d38896fcbc]:

To Artifact [ca75a1769b]:


170
171
172
173
174
175
176






177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
































196
197
198
199
200
201
202
  with multiple tokens becomes the token with one less backslash. It is
  permitted to redefine existing macros as well as new ones.

{include <string>}
  Include text from another file into this one. You cannot use {include}
  inside of another macro or in a macro argument.







{mod <number> <number>}
  Modulo.

{version <number>}
  Expands into nothing. The number must be zero, otherwise it is an error.
  Future versions of Free Hero Mesh may change this.

It is possible to implement a tag system in this preprocessor, which makes
it Turing complete. For example:

  {define "skip" {call \2}}
  {define "1" {skip \1|"3"|"3"|"2"|"1"|"H"}}
  {define "2" {skip \1|"3"|"3"|"1"}}
  {define "3" {skip \1|"3"|"3"}}
  {define "H" \1}
  {call "2"|"1"|"1"}

Note: Macro names are entirely independent from token names.


































=== Global definitions ===

These are the global definitions in the class definition file.

(Animate <limit>)
  Set the limit for logical animations, from 1 to 255. The default is 32.







>
>
>
>
>
>



















>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
  with multiple tokens becomes the token with one less backslash. It is
  permitted to redefine existing macros as well as new ones.

{include <string>}
  Include text from another file into this one. You cannot use {include}
  inside of another macro or in a macro argument.

{make <mode> <arg>}
  Make a synthetic token; see the below section about synthetic tokens for
  details. The second argument can be a number, or a direction or key name
  which is treated as a number, or a string. In most cases, a number will
  be converted to a string with its unsigned decimal representation.

{mod <number> <number>}
  Modulo.

{version <number>}
  Expands into nothing. The number must be zero, otherwise it is an error.
  Future versions of Free Hero Mesh may change this.

It is possible to implement a tag system in this preprocessor, which makes
it Turing complete. For example:

  {define "skip" {call \2}}
  {define "1" {skip \1|"3"|"3"|"2"|"1"|"H"}}
  {define "2" {skip \1|"3"|"3"|"1"}}
  {define "3" {skip \1|"3"|"3"}}
  {define "H" \1}
  {call "2"|"1"|"1"}

Note: Macro names are entirely independent from token names.


=== Synthetic tokens ===

The possible modes of synthetic tokens are:

 ":"    A label with the specified name.
 "=:"   Go to a label with a specified name.
 ",:"   Subroutine call a label with a specified name.
 "@"    A global variable.
 "=@"   Write a global variable.
 "%"    A local variable.
 "=%"   Write a local variable.
 "#"    A user-defined message.
 "$"    A class.
 "&"    A user-defined function.
 "^"    A user flag (read self, or definition).
 "=^"   A user flag (write self).
 ",^"   A user flag (read object).
 "=,^"  A user flag (write object).
 "'"    A key token; either by number or by name.
 "D"    A direction; only the low 4-bits are used.
 "+"    A number interpreted as decimal.
 "=+"   A number interpreted as binary.
 ",+"   A number interpreted as hexadecimal.
 "=,+"  A number interpreted as octal.
 "C"    A string with a single character of the specified code.
 ",C"   A string with a quiz button of the character with the code.
 "A"    The ASCII code of the first character of the string.

Note that as the argument, you can use {cat} to convert other tokens
to strings if needed.


=== Global definitions ===

These are the global definitions in the class definition file.

(Animate <limit>)
  Set the limit for logical animations, from 1 to 255. The default is 32.