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

Comparing libecb/ecb.pod (file contents):
Revision 1.63 by root, Wed Feb 18 20:29:38 2015 UTC vs.
Revision 1.64 by root, Wed Feb 18 20:48:59 2015 UTC

186it. This is mainly useful to get the contents of a macro in string form, 186it. This is mainly useful to get the contents of a macro in string form,
187e.g.: 187e.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
194Like C<ECB_STRINGIFY>, but additionally evaluates C<expr> to make sure it
195is a valid expression. This is useful to catch typos or cases where the
196macro 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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines