[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Conditional statements are used a lot in LPC, and there is several
ways of writing them. A very important concept is that 0 is considered
as false and any other value as true in tests. This means
that empty listings ({})
, empty strings ""
and empty
mappings ([])
also are evaluated as true since they
aren't 0
. You have to use special functions to compute their
size or determine content if you want test them, more about that later
however.
1.2.9.1 The if/else statement | The common if/else statement | |
1.2.9.2 The switch statement | ||
1.2.9.3 The ?: expression | The ?: statement |