X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=informqr%2Finformqr.md;fp=informqr%2Finformqr.md;h=0dee485b5c00a62d14ecad8965da1b0872ff52b8;hb=472e9f763a76762a6d91644de9b30b0f7b23825c;hp=e12df8ef2e569a5f453f424ed9918e42b9078151;hpb=3dc602a32e499c052bff366b93bd53effdf2ec38;p=inform-resources.git diff --git a/informqr/informqr.md b/informqr/informqr.md index e12df8e..0dee485 100644 --- a/informqr/informqr.md +++ b/informqr/informqr.md @@ -359,4 +359,32 @@ or an explicit return statement: To define a dummy standalone routine with N local variables (unless it already exists): - Stub routine N; \ No newline at end of file + Stub routine N; + +Flow control +------------ + +To execute statements if *expr* is true; optionally, to execute other +statements if *expr* is false: + + if (expr) + statement_block + if (expr) + statement_block + else + statement_block + +To execute statements depending on the value of *expr*: + + switch (expr) { + value: statement; ... statement; + value: statement; ... statement; + ... + default: statement; ... statement; + } + +where each *value* can be given as: + + constant + lo_constant to hi_constant + constant,constant, ... constant \ No newline at end of file