Expr

"Expressions" are the workhorses of any Cosmos program.

Expressions are also by far the class of language constructs with the most complicated rules. Fortunately, many of these rules will seem rather similar rules found in one or more of other mainstream programming languages, such as C, C++, C#, Obj-C, Java, Python, PHP, Perl, Ruby, JavaScript etc.

There are however also some kinds of expressions and technicalities that are not found in any of those mainstream languages.

The point of writing software usually boils down to automating some sort of task which involves information.

Expressions fill the role of converting and reducing information into other information, typically by reading some memory, manipulating or deriving new information and writing it back to memory.

Examples of such manipulations and derivations include a suite of arithmetic operations, alongside a number of memory access operations, as well as facilities to call subroutines.