[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/jacereda/daScript/master/examples/tutorial/tutorial05.cpp [Back]  [Original]

#include "daScript/daScript.h"

using namespace das;

#define TUTORIAL_NAME   "/examples/tutorial/tutorial05.das"

void tutorial () {
    TextPrinter tout;                               // output stream for all compiler messages (stdout. for stringstream use TextWriter)
    ModuleGroup dummyLibGroup;                      // module group for compiled program
    auto fAccess = make_smart();      // default file access
    // compile program
    auto program = compileDaScript(getDasRoot() + TUTORIAL_NAME, fAccess, tout, dummyLibGroup);
    if ( program->failed() ) {
        // if compilation failed, report errors
        tout errors ) {
            tout getContextStackSize());
    if ( !program->simulate(ctx, tout) ) {
        // if interpretation failed, report errors
        tout errors ) {
            tout 

Web Proxy Viewer  |  New URL  |  Original Page