Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
1 reply Latest Post - ‏2013-02-05T15:18:09Z by hnasgaard
Saruton
Saruton
111 Posts
ACCEPTED ANSWER

Pinned topic Can I use the technique like "#ifdef _DEBUG" & "#endif" on SPL source code?

‏2013-02-05T14:43:15Z |
Hi ALL,
We often use FileSource or FileSink during UT or debug, don't we? But they become unnecessary codes on production environment.
In C/C++ application, we can use #ifdef _DEBUG and #endif to distinguish appropriate codes associated with the target environment.
In SPL codes, can we use similar technique?

If there is a nice idea, could you help me?

Thanks & Regards,
  • hnasgaard
    hnasgaard
    200 Posts
    ACCEPTED ANSWER

    Re: Can I use the technique like "#ifdef _DEBUG" & "#endif" on SPL source code?

    ‏2013-02-05T15:18:09Z  in response to Saruton
    There is no notion of a preprocessor in the SPL compiler, but you could use mixed-mode along with some compile command-line options to gen either debug or non-debug code.