… | |
… | |
186 | it. This is mainly useful to get the contents of a macro in string form, |
186 | it. This is mainly useful to get the contents of a macro in string form, |
187 | e.g.: |
187 | e.g.: |
188 | |
188 | |
189 | #define SQL_LIMIT 100 |
189 | #define SQL_LIMIT 100 |
190 | sql_exec ("select * from table limit " ECB_STRINGIFY (SQL_LIMIT)); |
190 | sql_exec ("select * from table limit " ECB_STRINGIFY (SQL_LIMIT)); |
|
|
191 | |
|
|
192 | =item ECB_STRINGIFY_EXPR (expr) |
|
|
193 | |
|
|
194 | Like C<ECB_STRINGIFY>, but additionally evaluates C<expr> to make sure it |
|
|
195 | is a valid expression. This is useful to catch typos or cases where the |
|
|
196 | macro isn't available: |
|
|
197 | |
|
|
198 | #include <errno.h> |
|
|
199 | |
|
|
200 | ECB_STRINGIFY (EDOM); // "33" (on my system at least) |
|
|
201 | ECB_STRINGIFY_EXPR (EDOM); // "33" |
|
|
202 | |
|
|
203 | // now imagine we had a typo: |
|
|
204 | |
|
|
205 | ECB_STRINGIFY (EDAM); // "EDAM" |
|
|
206 | ECB_STRINGIFY_EXPR (EDAM); // error: EDAM undefined |
191 | |
207 | |
192 | =back |
208 | =back |
193 | |
209 | |
194 | =head2 ATTRIBUTES |
210 | =head2 ATTRIBUTES |
195 | |
211 | |
… | |
… | |
671 | =item ECB_INFINITY |
687 | =item ECB_INFINITY |
672 | |
688 | |
673 | Evaluates to positive infinity if supported by the platform, otherwise to |
689 | Evaluates to positive infinity if supported by the platform, otherwise to |
674 | a truly huge number. |
690 | a truly huge number. |
675 | |
691 | |
676 | =item ECB_NON |
692 | =item ECB_NAN |
677 | |
693 | |
678 | Evaluates to a quiet NAN if supported by the platform, otherwise to |
694 | Evaluates to a quiet NAN if supported by the platform, otherwise to |
679 | C<ECB_INFINITY>. |
695 | C<ECB_INFINITY>. |
680 | |
696 | |
681 | =item float ecb_ldexpf (float x, int exp) |
697 | =item float ecb_ldexpf (float x, int exp) |