Use #if not defined with OR boolean logic in preprocessor directives
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
Furthermore, if I want to negate the logic I can type:
Now, if I want to add some boolean logic like AND, OR etc. I have to use slightly different syntax as follows:
This allows me to say if the Flag "TEST" or the flag "NEWTEST" is defined then do something. What I cannot seem to find is how to negate the logic such that it says: if the Flag "TEST" is NOT defined OR the flag NEWTEST is NOT defined...
The syntax I have tried to come up with does not appear to work. I am looking for something similar to the following:
Any ideas??
Last edited by prodigious8; 03-15-2016 at 01:57 PM..
Reason: OR will not be valid for the logic I want
Hi,
I was reviewing a shell script and I found this line:
yum -y update >> >(/usr/bin/tee /var/log/file)
I have tried removing the >> directive and all that will occur is that the file will be created--nothing gets put in the file. If I put back the >> directive it works. If I remove the... (3 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)
I have four files a,b,c,d which need to contain certain in the sequence a, b, c ,d , each file command which needs to be executed,
what i m in need is that to executed file and cmd in the defined order and if any of the command FAIL or throw ERROR, it script shud come out... (3 Replies)
Hi,
Anyone please explain the functionality of ## in c.
I didn't get the following preprocessor directives,
# define LL(x) x ## LL
# define LL(x) x ## i64
Thanks,
Naga:cool: (1 Reply)
Hello,
Is there anyway to prevent users from modifying limits imposed by php.ini configuration in a phpSuExec configured PHP installation??
For example in server with PHP running in a module, I use php_admin_* directives:
php_admin_value memory_limit 40M
And users can't modify them... (0 Replies)
Is there a general rule I can apply when examining/editing ipfw entries?
Also, does each new entry have to have a unique rule number?
And, I think I can write a script to block code red infected machines (though I'm not sure it would do more than slim down my web server error message log),... (0 Replies)