En:Logical operations
Материал из Pocket Fallout для КПК на PDA PC PPC Mobile.
Содержание |
[править]
What are "Logical operations" ?
The logical operators compare boolean expressions and return a boolean result (true value or false value). In PFSL laguage as expression of logical operation can be :
- Logical operations;
- Results of activities of functions;
[править]
Logical operations
- AND – logical «AND»;
- OR – logical «OR»;
- NOT – logical «NOT»;
[править]
Comparison operations
- == (two «equal» value, without blanks !)- equality;
- > - greater than;
- < - less than;
- >= - greater than or equal to;
- <= - less than or equal to;
- <> - inequality;
[править]
Example
var a = 5; var b = 1; var c = 0; if (a > b) or (b==c) then c = a + b; else c = a - b; endif