Finally trying hard to catch exceptions

Prexonite now comes with exception handling in the form of try-catch-finally blocks. Their implementation is a bit different from the ones in C#.

Add System::IO to Imports;

function main
{
    try
    {
        var sw = new StreamWriter("foo.txt");
        sw.WriteLine("It worked!");
    }
    catch(var exc)
    {
        println(exc);
    }
    finally
    {
        dispose(sw);
    }
}

[Read more →]

Coroutines in Prexonite

Like the title reads: The Prexonite Scripting language and the virtual machine now support coroutines, routines with multiple entry points. They can be used to implement iterators, generators and infinite lists.

coroutine map(ref f, xs)
{
    foreach(var x in xs)
        yield f(x);
}

[Read more →]