Home Segments Index Top Previous Next

468: Mainline

When you use a status variable, you must decide what each bit is to do. The following represents one way to pack state information into a 1-byte status variable for the analyze_trades program:

                 Too few data 
                  |  Too many data 
                  |   |  Nonpositive price data 
                  |   |   |  Nonpositive size data 
                  |   |   |   | 
      Unused      |   |   |   | 
        |         |   |   |   | 
        v         |   |   |   | 
 ---------------  v   v   v   v   
*---*---*---*---*---*---*---*---* 
|   |   |   |   |   |   |   |   | 
*---*---*---*---*---*---*---*---*