[texhax] Help regarding Algorithm package

Farhana Khan j_farhana at yahoo.com
Wed Mar 5 00:58:17 CET 2008


Hello
   
  I was working with both algorithm2e and algorithmic package but could not find how to resolve the problem of putting an if condition with in the if condition i.e. nested if then else
   
   
  \ForEach{M $\in$  $s.MSG$_N$[]$}
 {
  \STATE $quadrant \leftarrow FindNBRQuadrant(M.XLoc,M.YLoc)$\;
 \eIf{quadrant $\GT$ $0$}
  {
   \eIf{M.eventdetected $=$ $true$}
   {
    \STATE $distance \leftarrow FindDistanceToNBR($M.XLoc$,$M.YLoc$)$\;
      \STATE $counteventQNBR[quadrant] \leftarrow counteventQNBR[quadrant]+1$\;
    \If{distance $\GT $distancetodistantQNBR[quadrant]$}
    {
     \STATE $distancetodistantQNBR[quadrant] \leftarrow distance$\;
     \STATE $slopeToDistantQNBR[quadrant] \leftarrow FindSlopeToDistantQNBR[distancetodistantQNBR[quadrant]]$\;
      }
    
    }
    {
    \STATE $countnoneventQNBR[quadrant] \leftarrow countnoneventQNBR[quadrant]+1$\;
    
    }
   
  }
  }
   
   
  regards
  farhana

       
---------------------------------
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/texhax/attachments/20080304/25fd5e3f/attachment.html 


More information about the texhax mailing list