Syntax

  Basic syntax
The Xill scripting language is an imperative language without types, user-defined classes or inheritance. Each command is closed by a semicolon ; . Variables and functions Variables are defined using the keyword var. For reassignment, this keyword is not used. Functions are defined using the k...
 Tue, 28 Aug, 2018 at 4:27 PM
  Operators
Example  var total_price = ticket_price * number_of_tickets The characters = and * are operators. ticket_price and number_of_tickets are operands of the multiplication, and total_price is the left operand of the assignment. Multiplying has the highest precedence; otherwise the assignment ...
 Tue, 28 Aug, 2018 at 4:28 PM
  Keywords
This is a list of all keywords in the Xill language, with an example code snippet. Almost all keywords are explained in more detail on another page. Click the accompanying link or use the search function on top. use (as) The use keyword allows a developer to declare usage of a Xill package...
 Tue, 28 Aug, 2018 at 4:29 PM
  Variable types
Declaring a variable At first, there is no differentiation in types at all. Declaring any variable is done with the var keyword: var count = 0; var leading_zero = "0"; In the example above, both variables will have a number value of 0 and a string value of "0". Ato...
 Tue, 28 Aug, 2018 at 4:30 PM
  Collections
Introduction A variable that is not atomic, is called a collection. Collections have one of two different variabletypes, which are LIST and OBJECT. A list is a numbered array of items, while an object consists of key-value pairs. A value can be atomic or a collection itself. The built-in packa...
 Tue, 28 Aug, 2018 at 4:30 PM
  Function
function functionName(__parameterNames) { } Functions allow structuring and reuse of code. They are defined with the function keyword, and their content is a code block enclosed in curly brackets. Functions can take parameters between brackets (parentheses). The return keyword is used to e...
 Tue, 28 Aug, 2018 at 4:31 PM
  Comments
// __comment /* __comment */ Comments are pieces of text in the robot that will not be processed. They can be used to provide inline documentation or to disable pieces of code without immediately removing them. There are two types of comments: single line and multi line. Single line commen...
 Tue, 28 Aug, 2018 at 4:32 PM
  Using libraries: include
include __fully_qualified_name; Xill enables (and encourages) developers to develop their project across multiple files. This way you can keep your project maintainable and the code re-usable. Description Include a bot to make all functions in it available to use in the parent robot. The i...
 Tue, 28 Aug, 2018 at 4:32 PM
  If, else and while
while (boolean __condition) { } if (boolean __condition) { } else { } Description Is used for the control structures. You can also take a look at foreach(). if, else Executes the code block following the statement if condition evaluates to true. Executes the code in the (optional) else state...
 Mon, 20 Aug, 2018 at 2:50 PM
  Foreach
foreach (__key*, __value in __collection) Description Used for control structures. See also if, else and while. Iterates over all items in the provided collection or iterator, putting key (optional) and value into the provided variables. The code block following the foreach statement, enclos...
 Mon, 20 Aug, 2018 at 3:26 PM
  Error Handling
do {} fail(error) {} success{} finally{} Description Four named code blocks that provide a way to handle errors before they can become a problem. do This code block will be executed for as far as no error occurs. Execution then continues to the next relevant of three (optional) blocks, e...
 Wed, 21 Nov, 2018 at 3:04 PM