I am currently using Linux CentOS and programming in FORTRAN 90 using Portland 7.1 compiler.
I am able to set in the preprocessor directives a flag called TEST. when I go to use logic in my code i can write
#ifdef TEST
execute something
#endif
Furthermore, if I want to negate the... (2 Replies)
Hi,
Just wondering if it is possible to trim the file path output by __FILE__ preprocessor in my debugging line.
Let's say my main.cpp file is found in C:\User\MyName\SystemA\Mod1\SubMod2\Test\main.cpp
for __FILE__, I just want the filename - main.cpp to be printed, instead of the entire... (2 Replies)
Say I have a list of enumerations I wish to use to select a variable at compile-time:
enum pins
{
PIN_A=1,
PIN_B=7,
PIN_C=6,
}
int VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7;
#define PIN_TO_VAR(NUM) VAR ## NUM
int main(void)
{
PIN_TO_VAR(PIN_A)=32;... (2 Replies)