HyperMath

EvalFile

EvalFile

Previous topic Next topic No expanding text in this topic  

EvalFile

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Executes a script and detects errors.

Syntax

bOK, msgerr = EvalFile(filename)

Arguments

Name

Description

 

filename

A string: the filename to execute in HyperMath.

Outputs

Name

Description

 

bOK

A Boolean: true if the script was executed without error.

 

msgerr

A string: an empty string if the script was executed without error.  In the other case, msgerr is the error message.

Example

Syntax

 

bOK, msgerr = EvalFile('d:/myfile.hml')

if !bOK then

 print('The error was:', msgerr)

else

 print('file executed without error.')

end

See Also:

Include

error

pcall