Cind programming language

Language definition Examples Download Contact

Code writing style

A programs in the Cind language are written in text files, usually with extension .cind and are being compiled to binary form - to files with extension .soft. This process is called a program compilation (see Compilation and execution). Only binary files are executed as a programs.

The compiler of the Cind programs expects, that code in text files will be written in UTF-8 charset (but it can be any other charset, having first 128 ANSI characters). The Cind compiler also uses text preprocessor in first phase of compilation process, to remove comments and apply macros (see Language text preprocessor).

A code can be written in free style, which means, that text elements can be freely surrounded by spaces, line's indentations, tabs and end-of-line characters. Code statements are organized in blocks { ... }, classes, sections and other structures. And instructions are separated by the semicolon character ( ; ). The only exception is the function execution statement f(x), which must be written on the same line (see Function execution).

A basic example of the program, consists of definition of some classes and one execute() section (which is a program's starting point in the console application), and so, its code may looks like:

class myclass { .doit() { host.println("Hello!"); } } execute() { new myclass().doit(); }

In above example, there is a definition of class myclass having one method doit, and in execute() section there is created one object of that class and then send a doit message.

Names

A names of the variables, classes, conditions and methods are case sensitive, and can consist of characters:

A..Z, a..z, _, 0..9

A name also can not has a digit as the first character, and can not be a language's keyword.

Keywords

List of keywords in the Cind language:

above, accept, any, attach, bool, break, broadcast, byte, caller, case, catch, char, class, condition, context, current, default, detach, do, else, enter, execute, extends, false, float, for, fun, host, if, int, leave, leaved, monitor, new, null, object, over, pocket, return, selector, sheet, signal, space, static, string, switch, this, throw, true, try, type, typeof, under, unknown, var, wait, while, with.

Cind programming language 1.0.4