Module Element
Module Element

Module Element

In every TAME module, there can be a section called a header that describes metadata related to the module, or additional instructions for the engine to follow. This is represented in TAMEScript as a section called "module" that is a series of key-value pairs.

Declaration


	module
	{
		key = [VALUE];
		...
	}
[VALUE] Any value for the corresponding key.

All header values are stored as strings in the module - if they are read with a utility or retrieved in the module via the command header(), it is returned as a string. The programs or implementations that read them can convert them to an expected type, though - if the value associated with the key is supposed to be an integer, TAME will try to parse it as one.

A sample module header would look like:


	module
	{
		title = "A Sample Module";
		author = "Matthew Tropiano";
		email = "matttropiano@email.net";
		web = "https://tame-if.com";
		twitter = "@ModuleMaker";
		ifid = "12345678-ABCD-EF90-1234-567890ABCDEF";
	}

Since the TAME header can contain any kind of metadata for modules, the following keys are considered standardized for most systems that wish to use module metadata in a meaningful way (this may change over time as more changes/standards are proposed):

Key Type (expected) Description
title string The formal title of the module.
author string The author of the module's name/pseudonym.
email string The author's E-mail address.
web string The author's main web site.
twitter string The author's Twitter handle.
ifid string This module's IFID number.

Special Headers

Although headers are intended to be purely informational, there are a few headers intended to be read by TAME implementations in order to alter certain run-time behavior. These key/value pairs are considered optional, but they MUST be supported by certified implementations of TAME. The defaults listed MUST be the accepted values if the keys are missing or the values are invalid or not able to be parsed.

The following are header keys that influence TAME:

Key Type (expected) Default Description
tame_runaway_max integer 100000 How many operations can be executed by TAME in one request before it stops with a FATAL error. This is for proactively detecting infinite loops.

If this value is 0 or less, the default is enforced.
tame_funcdepth_max integer 256 The legal function depth that TAME can call in one request before it stops with a FATAL error. This is for proactively preventing call stack overflows in the implementation.

If this value is 0 or less, the default is enforced.

Module Element

Module Element

×

Modal Header