what_file()

Returns the file name of the caller of the current function as a string when the optional argument, call_depth(), is supplied.

Syntax:

what_file([call_depth]);

where

call_depth is optional; default = 1. Instructs the function to return the file name of the file containing the calling function.

Example:

File x.ael:

defun funct()
{    // refers to funct() being called
      fputs(stdout,what_file());            // prints ./x.ael
      // refers to what_file() being called
      fputs(stdout,what_file(0));            // prints ./x.ael
      // refers to funct() being called
      fputs(stdout,what_file(1));            // prints ./x.ael
      // refers to x.ael being called (or loaded)
      fputs(stdout,what_file(2));            // prints ""
}
funct();
      // refers to x.ael being called (or loaded)
fputs(stdout,what_file());            // prints ""

Where Used:

Measurement Expressions (Data Display equations and Schematic MeasEqns), Schematic, Layout, Simulation, GUI

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources