company logo

How to write an OSI Script File

An OSI script file includes database locations, class and view definitions, definitions of global variables and expressions. A script file must have at least one function, which is declared as entry point. By default, this is an function with the name "main".

Script files for complex applications may include other script files, e.g. one script file per class.

Class extensions

Within a script file, one may extent the functionality of a class defined in the resource database, but one cannot extent the structure.

Syntax

The syntax of an OSI script file is compliant with the ODABA expression syntax and the ODABA ODL (object model definition language). Details are described in the "ODABA Language Reference".

Keywords

Most keywords in OSI can be written in upper or lower case letters (but not mixed). In the examples, we use capital letters to distinguish between keywords and variables or class members.

Comments

Comments can be written at the line end starting with //. After a comment no code can be defined on a line. Comments may also start on first line position.

// location for resource database

DICTIONARY=c:/ODABA2/Sample/Sample.res; // sample resources