Hi, in this we learn how to use the Case-Statement in the Delphi Programming Language.
Lazarus IDE: http://www.lazarus-ide.org/
Embarcadero Delphi: https://www.embarcadero.com/products/delphi
Delphi Programming Helper: http://www.softpedia.com/get/Programming/Other-Programming-Files/Delphi-Execute-Files-Helper.shtml
Amazon Auto Links: No products found.
Three annotations:
– Individual IF statements are not equivalent to CASE-OF statements if they are not nested in their ELSE sections. So, the code you wrote is in this case matching to the CASE pattern but not in general. Actually, you’d have to put them all in one IF statement and connect which next one with the ELSE of the last if statement.
– You can add multiple OR-connected label conditions for one CASE label. They are written like a normal range declaration in Delphi: ‘a’..’z’ or 0..255. You can also select single elements like you do when declaring a set: ‘a’,’b’,’c’ or 0,1,2.
– Like in IF statements, CASE statements also support ELSE. In CASE statements, ELSE is executed if no other label condition was matched.
Thx alot Shaun! Made me pass my test with an amazing 100% 😀
Nice Afrikaanse aksent
Are you South African ?