PyForTool
Python-fortran-tool
|
Public Member Functions | |
applyCPPifdef (self, keys) | |
pyfortool.cpp.Cpp.applyCPPifdef | ( | self, | |
keys | |||
) |
Apply #ifdef / #ifndef only on some keys :param keys: list of defined and undefined keys. The latter are preceded by a percentage sign '%'. E.g. if K is in keys, "#ifdef K "will be evaluated to True if %K is in keys, "#ifdef K" will be evaluated to False Warning: only #ifdef and #ifndef are treated and not "#if defined ..." If key K is in keys #ifdef K A #else B #endif is reduced to A If %K is in keys, code snippet is reduced to B. If neither K nor %K are present in keys, code is kept untouched.
Definition at line 18 of file cpp.py.