Skip to end of banner
Go to start of banner

Logical Operators

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

SIL supports the standard operators (+, -, *, /, %), however, those operators can be used on more than just numbers.

Example 1 - Basic numbers

if(1 == 1 && 2 == 2) {
    return true;
}

Example 2 - Strings

if(animal == "Cat" || animal == "Dog") {
  return "Pet";
}

Example 3 - Dates

if(!direction == "Up") {
  return "Down"
}

Example 4 - Intervals

Error rendering macro 'excerpt-include' : No link could be created for 'PSJ:Logical Example 4'.

Contents

For more information about using arithmetic operators see this page.

  • No labels