File: Logical%20Operators.txt

package info (click to toggle)
povray 1%3A3.7.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 146,780 kB
  • sloc: cpp: 845,005; ansic: 122,118; sh: 34,206; pascal: 6,420; asm: 3,355; ada: 1,681; makefile: 1,387; cs: 879; awk: 590; perl: 245; xml: 95
file content (26 lines) | stat: -rw-r--r-- 654 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// As logical operators there are '&' and '|' standing for
// logical AND and OR.
// They return arithmetic value 0 for false or 1 for true.
// Note that A and B are not handled bitwise but logical.

#if (A & B)
  ... // do this only if both A and B are true
#else // optional
  ... // do this only if both A and B are false
#elseif ( Cond ) // optional
  ... // do this only if both A and B are false and Cond true
#end

#if (A | B)
  ... // do this if either A or B is true
#end

#ifdef ( IDENTIFIER )
  ... // do this only if both A and B are true
#end

#ifndef ( IDENTIFIER )
  ... // do this only if both A and B are true
#end

#undef IDENTIFIER //