Reserved Words: Difference between revisions
Jump to navigation
Jump to search
Add catch and static. Add sub-headings "Primitive types", "Complex types", and "Miscellaneous" under "Data types". Make the link to Parser.java lead directly to the line |
→More Information: fixed the link to point to the new git |
||
Line 67: | Line 67: | ||
==More Information== | ==More Information== | ||
The file [https:// | The file [https://github.com/kolmafia/kolmafia/blob/main/src/net/sourceforge/kolmafia/textui/Parser.java <code>Parser.java</code>] contains the most up-to-date version of this list. | ||
[[Category:Scripting]] | [[Category:Scripting]] |
Revision as of 00:23, 1 May 2023
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"
- "try"
- "catch"
- "finally"
- "static"
Data types
Primitive types
- "void"
- "boolean"
- "int"
- "float"
- "string"
- "buffer"
- "matcher"
- "aggregate"
Complex types
- "item"
- "location"
- "class"
- "stat"
- "skill"
- "effect"
- "familiar"
- "slot"
- "monster"
- "element"
- "coinmaster"
Miscellaneous
- "record"
- "typedef"
More Information
The file Parser.java
contains the most up-to-date version of this list.