anScript

Runtime

runtimeRun(var.s path_source)

not available in anSript for Web

Open and run anScript code from file.


runtimeRunFromCharArray(var.s script)

Run anScript code from script’s value.


runtimeExit()

Exit interpreter.


runtimeError(var error, ...)

Throw executionError (error could be var.i, var.f or var.s).

Example:

main.ans

runtimeRun(<path>sayHello.ans.s)
instructionCreate(ins)
    variableCreate(key, var.i)
    logicLoop(1.i)
        windowGetKeyInput(key)
        consolePrintLine(key)
        logicSwitch(key)
            logicCase(27.i)
                runtimeEnd()
            }
            logicCase(logicDefault)
                timeWait(100.i)
            }
        }
    }
}
ins()

sayHello.ans

consolePrint(Hello!.s)
consoleNewLine()