Show contents 

Fore Language Guide

Fore Language Guide

The Fore language used in Foresight Analytics Platform is a fully object-oriented program language. Any program in this language includes one or several units. Units can be connected to each other using a link or combined in blocks. Each unit contains some program code consisting of structures and used to solve specific classes of tasks (for example, as a part of a larger task). Splitting program code into units provides language component orientation and program code reuse.

Program Structure

Program code is implemented in a unit's global namespace. It can include blocks describing constants, variables, and the following structures:

Structures can consist of one or several code blocks. Certain code blocks are located between keywords and have a specific purpose. For example, constant and variable blocks start from the Const and Var keywords, respectively. These blocks end with any keyword corresponding to the beginning of the next block or structure. Executable code is located in procedures/functions/properties between the Begin...End keywords and can contain other code structures/blocks.

A program can contain an entry point - the Main procedure that will be executed on unit/assembly start.

During code writing, the user often has to enter similar structures (procedures, functions, cycles, and so on) in a macro body; in general, these structures consist of language keywords and various names. To reduce the volume of code entered manually, the language provides automatic structure substitution of such structures. The language also supports automatic replacement of all keywords: keywords are typed in lower case with first capital letter and are highlighted with a color that is set in code editor settings.

To quickly learn how to work with the language see below the articles used for studying basic language structures, their purpose, syntax and principles of use: