(untyped) Exec(script)
This function will execute a script. The argument is a string giving
the script name or path. If the script is a file, it must have a
``.scr'' extension. The ``.scr'' extension is optional in
the argument. If no path is given, the script will be opened from the
search path or from the internal list of scripts read from the
technology file or added with the !script command. If a path is
given, that file will be executed, if found. It is also possible to
reference a script which appears in a submenu of the User Menu
by giving a modified path of the form ``@@/libname/.../scriptname''. The libname is the name of
the script menu, the ... indicates more script menus if the menu is
more than one deep, and the last component is the name of the script.
The return value is the result of the expression following ``return''
if a return statement caused termination of the script being
executed. If the script did not terminate with a return
statement with a following expression, the integer 1 is returned by
Exec. If the script indicated by the argument to Exec
could not be found, integer 0 is returned. If the return
statement is used, the type of the return is determined by the type of
object being returned.
Example: script1.scr
(executable lines)
return 3
in main script:
Print(Exec("script1")) # prints "3"