Skip to content

Latest commit

 

History

History
17 lines (9 loc) · 529 Bytes

BooleansComparators-notes.md

File metadata and controls

17 lines (9 loc) · 529 Bytes

Booleans

andalso is the equivalent of && orelse is the equivalent of ||

due to their short-circuiting, they AREN'T functions.

NOT is a function, though.

Lecture says that you can write the above with if then elses but it's considered poor style due to readability.

Comparators

You can use > < >= <= on reals but you can't combine ints and reals for comparing.

You cannot use the equality ones = and <> on reals. Lecture says that it isn't usually a wise idea to test equality with reals due to precision issues.