Difference between revisions of "Reserved Words"

From Kolmafia
Jump to navigation Jump to search
imported>Heeheehee
m (Added try/finally, added link to relevant file in source code.)
imported>Ulti
(→‎More Information: updating broken link)
Line 59: Line 59:
  
 
==More Information==
 
==More Information==
[http://kolmafia.svn.sourceforge.net/viewvc/kolmafia/src/net/sourceforge/kolmafia/textui/Parser.java?view=markup This particular page] contains the most up-to-date version of this list around line 272.
+
[https://sourceforge.net/p/kolmafia/code/HEAD/tree/src/net/sourceforge/kolmafia/textui/Parser.java This particular page] contains the most up-to-date version of this list around line 272.
 
[[Category:Scripting]]
 
[[Category:Scripting]]

Revision as of 19:02, 26 May 2016

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"
  • "finally"

Data types

  • "void"
  • "boolean"
  • "int"
  • "float"
  • "string"
  • "buffer"
  • "matcher"
  • "aggregate"
  • "item"
  • "location"
  • "class"
  • "stat"
  • "skill"
  • "effect"
  • "familiar"
  • "slot"
  • "monster"
  • "element"
  • "record"
  • "typedef"

More Information

This particular page contains the most up-to-date version of this list around line 272.