exclude function calls
Yani Dzhurov
yani.dzhurov@REDACTED
Fri Mar 24 15:56:39 CET 2006
Hi guys,
Is it possible to exclude some particular function calls in function
definition while compilation.
Here it is what I mean:
fun()->
foo(),
bar(),
baz().
For example to exclude calling bar() /during compilation/, but without
removing the code:.I want to be called sometimes, and sometimes not.
I've tried to do it with macros
fun()->
foo(),
-ifdef(some_macro).
bar(),
-endif.
baz().
This way it would be pretty easy to modify, but it's complaining for a
syntax error. Am I somewhere wrong?
I know I could use:
-ifdef(some_macro).
fun()->
foo(),
baz().
-else.
fun()->
foo(),
bar(),
baz().
-endif.
But this way it would double all the source code, since I need to use it in
almost all function, and would make it pretty unreadable.
I would appreciate any help and ideas how to implement it.
Thanks,
Yani
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060324/aef5b4cf/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3326 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060324/aef5b4cf/attachment.bin>
More information about the erlang-questions
mailing list