Gene logo      Menu
Gene name
Introduction
Documentation
Download
 
Development
Bugs
News

Tutorials

This section gives some tutorials to get familliar with the gene language.  All tutorials are for version 0.5 unless stated. All tutorials are structured in the same way: first you have a small explanation of the tutorial followed by an index, the full code example if applicable finallised with a more detailled explanation of all the techniques used.

Hello world Can't have a tutorials section without the hello world example.  This tutorial shows how to start a project, the usage of processes, how to include other units, defining an expression and how to write to the screen.

Structures This tutorial shows how to declare and use structures.  Furthermore, you can learn about global variables, loops and options, escape sequences, the sizeof operator and how to read from a file, ...or in other words..., a lot.

Spaces and stores This tutorial shows how to use the spaces and stores to create container like structures.  You will learn how to add, delete, select and loop through items from the space.  There is also a very small section on process variables in this tutorial.

Sending and receiving messages This tutorial shows how to use the messaging system to write to and read from a file and the screen .

Strings This tutorial shows how to use the string space.  Most of you will probably already know what a string object should be able to do, yet this is still worth a read cause strings in Gene have some neet features.  This tutorial also has an example of a 'for' loop.

Exceptions This tutorial shows you how to use and handle the standard exceptions and how to define you're own.  It also gives another example on how to use the interface system.

Memory management This tutorial shows how to create, access and delete dynamic memory and arrays.  It also explains a cool feature called 'owned pointers'.

More include This tutorial shows a special feature of the include statement: the 'ping-pong' effect.  With some cunning code craftmanship this can be used to eliminate the circular reference problem.

Libraries This tutorial shows you how to define, compile and use libraries.  There are some cool tricks shown here that can really make lib design and usage a whole lot easier.