And
 

Short Name: &

Definition: Represent a “AND” combination of two logical test operations

Usage: test1 & test2

Objective:
  • Execute a logical AND operation
  • Return YES if both test1 and test2 are YES
  • Returns a scalar value or an array of values.

Note:
  • Return value depends on the operands. If one of the operand is an array, then returns an array

Examples:
  • YES & YES always return YES
  • YES & NO always return NO
  • (open > 1000) & (close < 1500) returns an array where each value is either yes or no, depending on each open and close values