Als het resultaat "waar" is, dan voeren we het blok code uit vanaf "begin" tot het corresponderende "end".
If the result is true we execute the code block starting at "begin" up to the corresponding "end"
Laat bijvoorbeeld een blok code inspringen binnen een voorwaardelijk statement (if, else,...) of een lus (for, while,...).
For example, indent a code block that sits within a conditional (if, else,...) or a loop (for, while,...)
De volgende stap in het installatieproces laat een blok code zien om aan de wp-config.php toe te voegen.
The next step in the installation process shows a block of code to add to the wp-config.php.
In elk bestand bijna bovenaan onder de copyright verklaring, zoek naar een blok code zoals dit
In each file near the top, just below the copyright statement, look for block of code like this
De dubbele punt op het einde van de regel betekent het begin van een nieuw blok code. Dit is niet alleen het geval bij functies; alle soorten blokken code beginnen met een dubbele punt.
The colon at the end of the line starts a new code block - this is not only true for functions - all kinds of blocks can be started with a colon.
Een blok code van commentaar voorzien of uit commentaar halen.
Een: geeft aan dat de volgende lijnen zullen worden ingesprongen en deel uitmaken van een blok code.
A: indicates that the following lines will be indented and are part of the block.
Een blok code van commentaar voorzien of uit commentaar halen.
Door de regel "elk blok moet op zijn minst bestaan uit één regel" gebruiken we het sleutelwoord pass en dit doet wat het logischerwijs zou moeten doen, namelijk niks, maar de regel van een blok code is gehoorzaamd.
Because of the rule: every block needs at least one line, we use the keyword pass and it does what it should do: nothing, but the block building rule is satisfied. Calling a function
Ook een if-then-else-statement is eigenlijk een expressie met een waarde als resultaat, dat wil zeggen het resultaat van de evaluatie van een van de twee takken: Dit betekent dat een dergelijk blok code overal kan worden ingevoegd waar een expressie gewenst is.
Similarly, an if-then-else "statement" is actually an expression, which produces a value, i.e. the result of evaluating one of the two branches.