swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
     
operator  

number of current elements

 

 

Return type: Integer
Returns:       

Number of opened elements.



Syntax
  number of current elements element-qualifier*


Purpose

The number of currently opened elements, including the currently opened element (if any), can be determined using number of current elements.

Similarly, the number of opened elements down to and including a specified opened element can be determined by adding an element qualifier to specify the element to be examined.

If number of current elements is followed by of and an element-qualifier, then that qualifier must identify a currently opened element. On the other hand, number of current elements can always be used without a qualifier. If there are no opened elements, then the number of current elements without a following element qualifier has a value of zero (0).

The following element rule uses number of current elements to show the depth of the current element in the overall element hierarchy:

  element #implied
     set depth to number of current elements
     output "Element %q is nested %d(depth) deep. %n"
     output "%c"

       
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:35 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.