Thursday, January 17, 2013

Essential EGL+Batch - Lesson 02 Library



Here is the source code for Lesson02.egl:


package lab.lesson02;

program Lesson02
    function main()
        SysLib.writeStdout("Lesson 02");
        demo();
    end
    
    private function demo()
    functionName string = "demo";
    BatchLib.startFunction(functionName);
        BatchLib.endFunction(functionName);
    end
end


Here is the source code for BatchLib.egl:


package lab.lesson02;

library BatchLib
    private const PREFIX_START string = "START ";
    private const PREFIX_END string = "END ";

    function startFunction(name string in)
        message string = PREFIX_START :: name;
        SysLib.writeStdout(message);
    end

    function endFunction(name string in)
        message string = PREFIX_END :: name;
        SysLib.writeStdout(message);
    end
end


Thanks for watching!

No comments:

Post a Comment