Reserved Words: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle m Created page with 'Copypasta' |
imported>StDoodle No edit summary |
||
Line 1: | Line 1: | ||
{{TOCright}} | |||
Following is a list of words that are reserved for special usage by KoLmafia. They can not be used as variable (or function?) names. | |||
They are listed by category for ease of reference; the category names are not reserved words, themselves (though using them as variables would be considered poor practice in most cases). | |||
==Constants== | |||
*"true" | |||
*"false" | |||
==Operators== | |||
*"contains" | |||
*"remove" | |||
*"new" | |||
==Control flow== | |||
*"if" | |||
*"else" | |||
*"foreach" | |||
*"in" | |||
*"for" | |||
*"from" | |||
*"upto" | |||
*"downto" | |||
*"by" | |||
*"while" | |||
*"repeat" | |||
*"until" | |||
*"break" | |||
*"continue" | |||
*"return" | |||
*"exit" | |||
*"switch" | |||
*"case" | |||
*"default" | |||
==Data types== | |||
*"void" | |||
*"boolean" | |||
*"int" | |||
*"float" | |||
*"string" | |||
*"buffer" | |||
*"matcher" | |||
*"aggregate" | |||
*"item" | |||
*"location" | |||
*"class" | |||
*"stat" | |||
*"skill" | |||
*"effect" | |||
*"familiar" | |||
*"slot" | |||
*"monster" | |||
*"element" | |||
*"record" | |||
*"typedef" |
Revision as of 04:59, 17 April 2010
Following is a list of words that are reserved for special usage by KoLmafia. They can not be used as variable (or function?) names.
They are listed by category for ease of reference; the category names are not reserved words, themselves (though using them as variables would be considered poor practice in most cases).
Constants
- "true"
- "false"
Operators
- "contains"
- "remove"
- "new"
Control flow
- "if"
- "else"
- "foreach"
- "in"
- "for"
- "from"
- "upto"
- "downto"
- "by"
- "while"
- "repeat"
- "until"
- "break"
- "continue"
- "return"
- "exit"
- "switch"
- "case"
- "default"
Data types
- "void"
- "boolean"
- "int"
- "float"
- "string"
- "buffer"
- "matcher"
- "aggregate"
- "item"
- "location"
- "class"
- "stat"
- "skill"
- "effect"
- "familiar"
- "slot"
- "monster"
- "element"
- "record"
- "typedef"