EXPRESSIONS: Difference between revisions

From AddictHelp
Jump to navigation Jump to search
Kahlan (talk | contribs)
No edit summary
Kahlan (talk | contribs)
No edit summary
 
Line 18: Line 18:




[[CATEGORY:SCRIPTS]]
[[CATEGORY:Scripts]]

Latest revision as of 10:24, 20 November 2008

A false expression is any expression that evaluates to 0, or an empty string. A true expression is any expression that evaluates to anything other than a false expression. The following list are the recognized operators. The higher the operator is on the list, the higher the precidence. The expression is evaluated from left to right. Parenthesises can be used to group.

  Operators    Name           Examples
  ---------    ----           --------
    &&         logical and    1 && 0  = 0;  5 && 3 = 1
    ||         logical or     0 || ( ) = 0; 5 || 0 = 1
    ==         eqivalence     5 == 3 = 0;  dog == DoG = 1
    !=         inequality     0 != Z = 0;  dog != d = 1
    -          subtraction    15 - 10 = 5
    +          addition       10 + 15 = 25
    *          multiplication
    /          division
    !          negation       !() = 1;  !0 = 1; !dog = 0;