Difference between revisions of "LEVEL()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
|||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to return the 'do' level of the currently executing program or procedure | Function to return the 'do' level of the currently executing program or procedure | ||
− | |||
==Syntax== | ==Syntax== | ||
LEVEL() | LEVEL() | ||
− | |||
==See Also== | ==See Also== | ||
− | + | [[DO]], [[DOLEVEL()]], [[PATH()]], [[PROCLIBS()]], [[PROCLINE()]], [[PROCNAME()]], [[PROGRAM()]], [[SYS()]] | |
− | + | ||
==Description== | ==Description== | ||
The LEVEL() function returns the 'do' level of the currently executing program or procedure. Issued at the command prompt, the LEVEL() function returns 0. Issued in a master or calling program, LEVEL() returns 1. Subsequent called programs or procedures are at a 'do' level based on the program nesting. | The LEVEL() function returns the 'do' level of the currently executing program or procedure. Issued at the command prompt, the LEVEL() function returns 0. Issued in a master or calling program, LEVEL() returns 1. Subsequent called programs or procedures are at a 'do' level based on the program nesting. | ||
− | |||
==Example== | ==Example== | ||
Line 33: | Line 29: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] |
Revision as of 08:00, 25 November 2011
Contents
Purpose
Function to return the 'do' level of the currently executing program or procedure
Syntax
LEVEL()
See Also
DO, DOLEVEL(), PATH(), PROCLIBS(), PROCLINE(), PROCNAME(), PROGRAM(), SYS()
Description
The LEVEL() function returns the 'do' level of the currently executing program or procedure. Issued at the command prompt, the LEVEL() function returns 0. Issued in a master or calling program, LEVEL() returns 1. Subsequent called programs or procedures are at a 'do' level based on the program nesting.
Example
> ? level() 0 //master.prg procedure subproc1 ? level() ? return ? level() subproc1() //end of master.prg > do master 1 2