====== GetNodePosFromHead ====== Gets the ordinal position of a node within a list, counting from the head of the list. ==== Synopsis ==== ''%%int32 GetNodePosFromHead(const List *l, const Node *n);%%'' ==== Description ==== This function scans the supplied list looking for the supplied node, and returns the ordinal position of the node within the list. If the node doesn't appear in the list, the function returns -1. ==== Arguments ==== * **l** A pointer to the list to scan for the node. * **n** A pointer to a node to locate in the list. ==== Return Value ==== The ordinal position of the node within the list counting from the head of the list, or -1 if the node isn't in the list. The first node in the list has position 0, the second node has position 1, etc. ==== Implementation ==== Convenience call implemented in clib.lib V24. ==== Associated Files ==== * **list.h** ANSI C Prototype * **clib.lib** ARM Link Library ==== Caveats ==== GIGO (garbage in, garbage out) ==== See Also ==== ''%%AddHead%%''(), [[:documentation:development:opera:pf25:ppgfldr:pgsfldr:spr:01spr003#xref18583|AddTail]](), [[:documentation:development:opera:pf25:ppgfldr:pgsfldr:spr:01spr087#xref20096|InsertNodeFromHead]](), [[:documentation:development:opera:pf25:ppgfldr:pgsfldr:spr:01spr088#xref26607|InsertNodeFromTail]](), [[:documentation:development:opera:pf25:ppgfldr:pgsfldr:spr:01spr110#xref15588|RemHead]](), [[:documentation:development:opera:pf25:ppgfldr:pgsfldr:spr:01spr111#xref25186|RemNode]](), [[:documentation:development:opera:pf25:ppgfldr:pgsfldr:spr:01spr112#xref23933|RemTail]]() ====== ====== ----