"abstract" is used to designate a class as a base class. A derivative of the abstract class must implement all of its abstract methods and properties.
"and" is a logical operator that is applied to test if two boolean expressions are true.
The "as" keyword declares a variables type.
"AST" is used to create AST objects for use with the Boo compiler.
"break" is a keyword used to escape program execution. Typically break is used inside a loop and may be coupled with the "if" or "unless" keywords.
"callable" allows function or type to be called by another.
"cast" is a keyword used to explicitly transform a variable from one data type to another.
"char" is a data type representing a single character. The char data type is distinct from a string containing a single character. char('t') refers to a System.Char type, whereas "t" or 't' is a System.String.
"class" is a definition of an object including its properties and methods.
"constructor" is a method belonging to a class that is used to define how an instance of the class should be created. The constructor may include input parameters and may be overloaded.
see the examples for the keyword "class"
"continue" is a keyword used to resume program execution at the end of the current loop.
The continue keyword is used when looping. It will cause the position of the code to return to the start of the loop (as long as the condition still holds).
"def" is used to define a new function or method.
"destructor" is used to destroy objects. Destructors are necessary to release memory used by non-managed resources in the .NET CLI. Desctructors should never be called explicitly. They can be invoked by implementing the IDisposable() interface.
"do" is synonymous with 'def' for closures. However, "do" reads as an imperative and therefore should be used in an active sense.
"elif" is similar the same as the "if" conditional statement in form, except that it needs to be preceded by an if statement or another elif statement and that it is only evaluated (checked) if the if/elif statement preceding it evaulates to false.
If one of the preceding if/elifs statements evaluates to true, the rest of the elifs will not be evaluated, thus sparing extra CPU power from a pointless task.
"else" is defines a statement that will be executed should a preceding "if" condition fail.
"ensure" is used with the "try" and "except" keywords to guarantee a certain block of code runs whether the try/except block is successful or not. "ensure" is often used to add some post executions to an exception event.
"enum" is used to create a list of static values. Internally the names are assigned to an Int32 value.
"event" is (insert text here)
"except" is keyword use to identify a block of code that is to be executed if the "try" block fails.
See examples under the "ensure" keyword.
"failure" is not yet implemented in boo.
"final" is a keyword used to identify a class that cannot have subclasses. final may also be used to declare a field as a constant.
"from" is used with the "import" keyword to identify the assembly being imported from. Form usage is "import TARGET (from ASSEMBLY). The "from" keyword is optional.
"for" is used to loop through items in a series. "for" loops are frequently used with a range or a listarray.
"false" represents a negative boolean outcome.
"get" is used to identify a field that is exposed for external access. Use "get" to make a field available as read-only. Use "set" to add write access. "get" is suffixed by a colon when implemented and includes a return statement. It is possible to modify the value of the field being returned. See example 1.
"get" is also used when defining an interface to define which fields should be implemented as accessible. When "get" is used to define an interface the colon and return statements are excluded. See example 2.
"given" is used as the entry to a "given ... when" loop. "given" identifies a state. A series of "when" statements may be executed based on the identified state. _ The "given" keyword is currently not implemented. _
"goto" exits a line of code and moves to a named line in the code. The named line must be prefixed wtih a colon. Good programming practice eschews the use of "goto"
The example below names two lines ":start" and "test". They are referenced in the code by separate goto statements. This example produces an endless loop. The "ensure" statement includes a Console.Readline() that prevents the loop from continuing without user input.
"if" is a conditional statement, followed by a statement that either evaluates to true or false. In block form, the code within the block is executed only if the expression following the if evaluates to true.
The if statement can be used to selectively execute a line of code by placing "if <expression>" at the very end of the statement. This form of the if conditional is useful in circumstances when you are only going to perform one operation based entirely on an expression: this makes the code cleaner to read than an unnecessary if block.
"import" is used to include a namespace from other assemblies within your program. If the assembly is not automatically included, the "from" keyword must be included to identify the respective assembly.
"in" is used in conjunction with "for" to iterate through items in a list. "in" may also be used to test items in a set.
See examples for the keyword "for".
"inteface" is used to define the fields and methods that may be implemented by a class. The implementation is never performed by the interface. Interfaces allow you to establish an API that is the basis for other classes.
"internal" is a keyword that precedes a class definition to limit the class to the assembly in which it is found.
"is" is an equvalence operator keyword that is used to test a value. "is" may not be used with ints, doubles, or boolean types. "is" is commonly used to test for null.
"isa" determines if one element is an instance of a specific type.
"not" is used with "is" to perform a negative comparison. "not" can also be used in logical expressions.
"null" is a keyword used to specify a value is absent.
"of" is used to specify type arguments to a generic type or method.
"or" is a logical operator that is applied to test if either of two boolean expressions are true.
"otherwise" is part of the conditional phrase "given ... when ... otherwise". The otherwise block is executed for a given state if none of the when conditions match. _ The otherwise keyword is not yet implemented _
See examples for "given".
"override" is used in a derived class to declare that a method is to be used instead of the inherited method. "override" may only be used on methods that are defined as "virtual" or "abstract" in the parent class.
"namespace" is a name that uniquely identifies a set of objects so there is no ambiguity when objects from different sources are used together. To declare a namespace place the namespace followed by the name you choose at the top of the file.
"partial" is (insert text here)
"pass" is a keyword used when you do not want to do anything in a block of code.
"public" is used to define a class, method, or field as available to all. "public class" is never required because a defined class defaults to public.
"protected" is a keyword used to declare a class, method, or field as visible only within its containing class. Fields are by default protected. Prefixing a field name with an underscore is recommended practice.
"private" is keyword used to declare a class, method, or field visible within only its containing class and inherited classes..
"raise" is (insert text here)
"ref" makes a parameter be passed by reference instead of by value. This allows you to change a variable's value outside of the context where it is being used
"retry" is not yet implemented.
"return" is a keyword use to state the value to be returned from a function definition
"self" is used to reference the current class. "self" is not required for boo but may be used to add clarity to the code. "self" is synonymous with the c# keyword "this".
"set" is a keyword used to define a field as writeable.
"static" is (insert text here)
"struct" is short for structure. A structure is similar to a class except it defines value types rather than reference types.
Refer to the Boo Primer for more information on structures.
"success" is not yet implemented.
"super" is used to reference a base class from a child class when one wants to execute the base behavior.
"transient" transient marks a member as not to be serialized. By default, all members in Boo are serializable.
"true" is keyword used to represent a positive boolean outcome.
"try" is used with the "ensure" and "except" keywords to test whether a block of code executes without error.
typeof returns a Type instance. Unnecessary, in Boo since you can pass by type directly.
"unless" is similar to the "if" statement, except that it executes the block of code unless the expression is true.
"virtual" is a keyword that may precede the 'def' keyword when the developer wishes to provide the ability to override a defined method in a child class. The 'virtual' keyword is used in the parent class.
"when" is used with the "given" keyword to identify the condition in a which the "given" value may be executed. _b "when" is currently not implemented.
see examples for the "given" keyword.
"while" will execute a block of code as long as the expression it evaluates is true.
It is useful in cases where a variable must constantly be evalulated (in another thread, perhaps) , such as checking to make sure a socket still has a connection before emptying a buffer (filled by another thread, perhaps).
"yield" is similar to "return" only it can be called multiple times within a single method.