EasyLanguage Reserved Words & Functions

# And (Reserved Word)

This boolean operator is used in compare boolean values using AND logic.

AND

#### Logical Expression Operator

When used in a logical expression, AND returns True when the boolean values on either side of the AND are both True, as in the table below:

Exp1 |
Exp2 |
Exp1 AND Exp2 |

True |
True |
True |

False |
True |
False |

True |
False |
False |

False |
False |
False |

If Plot1 Crosses Above Plot2 AND Plot2 > 5 Then...

AND is used here to determine if the direction of the cross of the values Plot1 and Plot2, and that Plot2 is greater than 5 are both True on the bar under consideration. If either is False, the condition returns False.

If Value1 Crosses Above Value2 AND Value1 > Value1[1] Then...

AND is used here to determine if the direction of the cross of the variables Value1 and Value2, and that Value1 is greater that Value1 of one bar ago are both True on the bar under consideration. If either is False, the condition returns False.

## Bitwise Binary Operator

When used with integer values, the AND keyword functions as a bitwise operator, following the rules of the table below:

Bit1 |
Bit2 |
Bit1 AND Bit2 |

1 |
1 |
1 |

0 |
1 |
0 |

1 |
0 |
0 |

0 |
0 |
0 |

Respective bits from each integer will be compared. If both bits are 1, the resulting bit will be 1. Otherwise the resulting bit will be 0.

For example, the integer expression 2 AND 6 = 2 (x0010 AND x0110 = x0010).