Ferite - Examples

Examples

Basic "Hello World" program:

uses "console"; Console.println( "Hello World" );

Using closures/lambda functions:

// Define some numbers: number x = 10, y = 15, z = 30; // A closure to add those numbers: object o = closure { return x + y + z; }; // Use the closure: Console.println(o.invoke); // Change the numbers: x = 5; y = 10; z = 5; // Use the closure again: Console.println(o.invoke);

Iterating through an array:

Array.each( ) using ( value ) { Console.println( value * 5 ); };

These are just some of the beginners examples available.

Read more about this topic:  Ferite

Famous quotes containing the word examples:

    There are many examples of women that have excelled in learning, and even in war, but this is no reason we should bring ‘em all up to Latin and Greek or else military discipline, instead of needle-work and housewifry.
    Bernard Mandeville (1670–1733)

    Histories are more full of examples of the fidelity of dogs than of friends.
    Alexander Pope (1688–1744)