swirl
Guide to OmniMark 9   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 ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:51:21 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.