include

Description

Include (and interpret) the code in the specified file.

Syntax

number = include(filename)

ParameterDescription
filename String containing the name of the file to be included.

Return Value

Returns zero if the file has been successfully included. Any non-zero return code indicates an error.

Remarks

Return codes indicating failure are almost always caused by a nonexistent or unreadable script file, not errors in the script itself.

Example

The following example demonstrates how to load a script and verify its success.

rval=include("./somefile.ns");
if (rval!=0) print("error loading ./somefile.ns\n");