ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/libecb/ecb.pod
(Generate patch)

Comparing cvsroot/libecb/ecb.pod (file contents):
Revision 1.4 by root, Thu May 26 20:05:25 2011 UTC vs.
Revision 1.5 by root, Thu May 26 20:05:55 2011 UTC

66Returns true iff the expression can be deduced to be a compile-time 66Returns true iff the expression can be deduced to be a compile-time
67constant, and false otherwise. 67constant, and false otherwise.
68 68
69For example, when you have a C<rndm16> function that returns a 16 bit 69For example, when you have a C<rndm16> function that returns a 16 bit
70random number, and you have a function that maps this to a range from 70random number, and you have a function that maps this to a range from
710..n-1, then you could use this inline fucntion in a header file: 710..n-1, then you could use this inline function in a header file:
72 72
73 ecb_inline uint32_t 73 ecb_inline uint32_t
74 rndm (uint32_t n) 74 rndm (uint32_t n)
75 { 75 {
76 return n * (uint32_t)rndm16 ()) >> 16; 76 return n * (uint32_t)rndm16 ()) >> 16;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines