execstr - execute Scilab code in strings
Executes the Scilab instructions given in argument instr.
If the 'errcatch' flag is not present, error handling works as usual.
If the 'errcatch' flag is set, and an error is encountered while executing the instructions defined in instr, execstr issues no error message, but aborts execution of the instr instructions (at the point where the error occurred), and resumes with ierr equal to the error number. In this case the display of the error message is controlled by the msg option:
execstr('a=1') // sets a=1. execstr('1+1') // does nothing (while evstr('1+1') returns 2) execstr(['if %t then'; ' a=1'; ' b=a+1'; 'else' ' b=0' 'end']) execstr('a=zzzzzzz','errcatch') execstr('a=zzzzzzz','errcatch','m')