About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/evalfile.tm.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 evalfile Context: slangrtl

Synopsis

Interpret a file containing S-Lang code.

Syntax

Integer_Type evalfile (String_Type file, [,String_Type namespace])

Description

The evalfile function loads file into the interpreter and executes it. If called with the optional namespace argument, the file will be loaded into the specified namespace, which will be created if necessary. If no errors were encountered, 1 will be returned; otherwise, a S-Lang error will be generated and the function will return zero.

Example

    define load_file (file)
    {
       ERROR_BLOCK { _clear_error (); }
       () = evalfile (file);
    }

For historical reasons, the return value of this function is not really useful.

The file is searched along an application-defined load-path. The get_slang_load_path and set_slang_load_path functions may be used to set and query the path.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.