Arbortext Command Language > Functions by Alphabetical Listing > oid_last
  
oid_last
oid_last ([doc])
This function returns the object identifier of the last object in the document tree given by doc, or the current document if doc is omitted or 0.
Examples
This function could be written using oid_child as follows:
function oid_last(doc = 0)
{
local o = last = oid_first(doc)
# just go right as deep as we can
while (oid_valid(o)) {
last = o
o = oid_child(o, -1); # get last child
}
return last
}
However, using the built-in oid_last function is more efficient.
Related Topics
oid_child function
oid_first function
oid_valid function