Scripts
Scripts are made up of two main parts and are written as follows:
Class, Namespace, Function, Global and Use definitions
Main program code
|
The Main program code is what is called when the script is run. All
parts of a program have to be declared before they are used. This is
to keep the code clean rather than a name resolution reason (all names
are resolved at runtime within ferite). The Main program code is
equivalent to the main() method within a C or Java program.
An example script (the famous Hello World program):
uses "console";
Console.println( "Hello World from ferite" );
|
The 'uses' statement is used to import API either from and external
module or from another script and is described in greater depth later
on. This is highly useful as the default operation of ferite has no
API.