next up previous contents
Next: Find the Address of Up: Finding Addresses: Previous: Finding Addresses:

Find the Address of an Element:

    // ************************************ //
    // protected search agent               //
    // ************************************ //
FLOAT_POLY_CELL* FLOAT_POLY::get_element_address(unsigned int p)
{
  FLOAT_POLY_CELL *temp;
  if(!(head==NULL)){
    temp = head;
    if(p==temp->power){
      return(temp);
      }
    temp = head->next;
    while(!(temp==NULL)){
      if(p==temp->power) return(temp);      
      temp = temp->next;
      }
    }
  return(NULL);
}



Jim Peterson
1999-04-22