what_line()

Returns the line number of the caller of the current function as an integer.

Syntax:

what_line([call_depth]);

where

call_depth is optional; default = 1. Instructs the function to return the line number of the caller of the function at that call_depth.

Example:

File x,ael:

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

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