This preview shows pages 1–7. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
“=”:  BOOLEAN  operator for equality Is_It := (One + 1) = Two; Is_It := (1 + 1) = 2; Is_It := 2 = 2; Is_It := TRUE; The single equal sign is the BOOLEAN operator for equality, and if the two expressions being evaluated are of the same value, a value of TRUE will result. If they are not of the same value, the BOOLEAN result will be FALSE
Examples of BOOLEAN operators Question := Index = Count; -- Equality Question := Index /= Count; -- Inequality Question := Index < Count; -- Less than Question := Index <= Count; -- Less than or equal Question := Index > Count; -- Greater than Question := Index >= Count; -- Greater than or equal

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Examples of composite BOOLEAN  expressions Question := Index = 12 and Count = 12 and Truth and TRUE; Question := Index /= 12 or FALSE or Count > 3 or Truth Question := (Truth or Lies) and (Truth and not Lies); Question := Truth xor Lies;
Order of Precedence of Operators  ** not abs -- Highest precedence * / mod rem -- Multiplying operators + - -- Unary operators + - & -- Binary adding operators = /= < -- Relational operators <= > >= -- Relational operators in not in -- (same precedence) and or xor -- Logical operators and then or else -- (same precedence)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Control Structures loop <...> end loop ; while <BOOLEAN expression>
This is the end of the preview. Sign up to access the rest of the document.