Conditionals and Loops

Conditional statements used in NWNScript.


TitleBrief Description
: Ternary ConditionalSimple conditional operator similar to an if statement.
break StatementHalts the execution of a loop or switch and skips any remaining statements within the loop or switch code block.
continue StatementSkips any remaining statements within a loops current iteration, and begins execution at the beginning of the next iteration.
do LoopExecutes a block of code (at least once) and then repeats the block based on the value of an expression.
for LoopRepeats the execution of a code block based on the value of a counter.
if/else StatementExecutes code blocks based on a Boolean condition.
switch/case StatementCreates a series of conditional branches based on the value of a single variable.
while LoopRepeats the execution of a code block based on the value of an expression.


JP team: ohtsuki
Send comments on this topic.