home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / compat / string / ffs.txh < prev    next >
Encoding:
Text File  |  1995-07-12  |  440 b   |  29 lines

  1. @node ffs, string
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <string.h>
  6.  
  7. int ffs(int _mask);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function find the first (least significant) bit set in the input
  13. value.
  14.  
  15. @subheading Return Value
  16.  
  17. Bit position (1..32) of the least significant set bit, or zero if the
  18. input value is zero.
  19.  
  20. @subheading Example
  21.  
  22. @example
  23. ffs(0) = 0
  24. ffs(1) = 1
  25. ffs(5) = 1
  26. ffs(96) = 6
  27. @end example
  28.  
  29.