Last updated
Was this helpful?
Last updated
Was this helpful?
The functions for working with a virtual machine during script execution are described here.
The trace type is used to store information about the called function and has the following fields:
str Path - filename
str Entry - current function
str Func - called function
int Line - the line in the source code
int Pos - the position in the line where the function was called
The error function throws a custom runtime error.
id - the identifier of the error,
text - the text of the error,
pars - optional parameters. If they are specified, then text must contain an appropriate template
The ErrID function returns the identifier of the err error. This function can be used inside try-catch statement for error handling.
The ErrText function returns the text of the err error. This function can be used inside try-catch statement for error handling.
The ErrTrace function returns the stack of called functions at the moment when the err error occurs. This function can be used inside try-catch statement for error handling.
The exit function terminates the script. The function can be called in any thread. The script returns the value of code.
The Progress function increases the process counter by the value of parameter inc. id is the progress bar identifier returned by the ProgressStart function. The Progress function calls Go function ProgressFunc which must be defined in the settings when the script starts.
The ProgressEnd function removes the process counter with the id identifier.
The Trace function returns a stack of called functions.
as in function.
The ProgressStart function creates a process counter and returns its identifier. total is the maximum counter value. ptype - counter type, can be any number. src is the name of the source. dest is the name of the target. The functions for working with the progress bar do not display anything, they call the ProgressFunc function, which should be defined in when running the script. In the ProgressFunc function you can display the state of the process in a way that is convenient for you. After you have finished working with this counter you must call ProgressEnd to delete it.