Language Syntax

From HLKitWiki
Jump to: navigation, search

Context: HL KitKit Reference 

The scripting language used by the Kit is not a clone of another language, although it does share similarities to a few. This section outlines the basic syntactic rules that govern the language.

The scripting language is line-based. Exactly one statement must be on a line, and each line is terminated by a carriage return (or newline). Long statements may not be split across multiple lines.

Any script line on which the very first non-whitespace character is a '~' is treated as a comment and ignored. Use of the '~' character anywhere else on a line (i.e. after the first non-whitespace character) is treated as normal scripting code. Therefore, it is not possible to specify "end-of-line" comments.

All script code is case-sensitive. Uppercase letters are distinct from lowercase characters in all circumstances. Therefore, the variable "foo" is distinct from the variables "Foo" and "FOO". This applies to all facets of the scripting language, which uses lowercase text exclusively for all keywords (e.g. "var", "if", "then", etc.).