Parameter | Type | Description |
---|---|---|
KEY | VALUE(STRING) | The name of the header key. Interpreted as string, even if it isn't. |
VALUE(STRING) | The corresponding value for the key. |
VALUE(BOOLEAN) | FALSE, if no corresponding key. |
This fetches the value of a module header as a string, or FALSE if the provided key does not have a corresponding value.
module
{
title = "The Header Example";
author = "Matt Tropiano";
email = "mtropiano@emailsite.com";
}
world
{
start()
{
textln("This module's name is: "+header("title"));
textln("It was made by: "+header("author"));
textln("The author's E-mail is: "+header("email"));
quit;
}
}
This function is mostly for debugging purposes. It may be a bad idea to make decisions based on the values that this function may return.
Headers are stored as strings in the module no matter how they are declared in TAMEScript. They must be parsed into a different type if they need to be something other than a string.