From the nesC documentation (somewhat hidden in /usr/share/ncc/doc, admittedly):

It is also possible to declare, using the special @integer() and @number()
attributes, that a type parameter is of an integral (respectively numerical)
type. In that case, all the operations allowed on integers (respectively,
integers and floating-point numbers) are allowed:

 generic module Sort(typedef t @number()) { }
 implementation {
   ...
   void f() {
     t x1, x2;
     ...
     if (x1 < x2)
       ...
 }

David Gay
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to