3 ms·
If you want to delete both if either is true you could write: If (a == 3) || (b == 4) delete them
by vorg 9y ago
If you want to delete both if either is true you could write:
If (a == 3) || (b == 4) delete them
- dnautics 9y agowhat if you want to delete a on the b condition?
- vorg 9y agoIf there's one condition, use `it`. If there's two, use `this` and `that`, i.e. if (a == 3) || (b == 4) delete this //to delete a and if (a == 3) || (b == 4) delete that //to delete b
- dnautics 9y agoWhat if there are three? Also this should refer to the temporally closer element, so your choices are backwards.
- vorg 9y agoInstead of `it` for one, and `this` and `that` for two, use `este`, `ese` and `aquel` for three (from the 3-tier pronoun system in Spanish). Please don't ask what if there's four. Very few (if any) natural languages have more than 3 tiers of demontrative pronouns, so computer languages shouldn't -- if they're using ideas natural language to be more readable. They would use identifiers or numeric subscripts instead.