3.3.53. scriba_Run()

[<<<] [>>>]

Call this function to execute a program. Note that you can call this function many times. Repetitive execution of the same program will execute the ScriptBasic code again and again with the global variables keeping their values.

If you want to reset the global variables you have to call @xref{scriba_ResetVariables()}.

There is no way to keep the value of the local variables.

The argument pszCommandLineArgument is the command part that is passed to the BASIC program.

int scriba_Run(pSbProgram pProgram,
               char *pszCommandLineArgument
  ){
The return value is zero in case of success or the error code returned by the underlying execution layers.

Note that you can not call BASIC subroutines or functions without initializations that scriba_Run performs. You also can not access global variables. Therefore you either have to call scriba_Run or its brother @xref{scriba_NoRun()} that performs the initializations without execution.

You also have to call @xref{scriba_NoRun()} if you want to execute a program with some global variables having preset values that you want to set from the embedding C program. In that case you have to call @xref{scriba_NoRun()} then one or more times @xref{scriba_SetVariable()} and finally Run.


[<<<] [>>>]