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
Личные инструменты