User Tools

Site Tools


crpl:docs:else

This is an old revision of the document!


~~DISCUSSION~~ <- CRPL reference <- Flow Control

else

ArgumentsResultNotation

Description

When the if statement evaluates to False, then the statements following the else, up to the endif, are executed instead.

Examples

# Pick a random number. If the random number is less than 95 emit 
# 10 Creeper, otherwise emit 100 Creeper 
0 100 RandInt lt if 
		CurrentCoords 10 SetCreeper 
	else 
		CurrentCoords 100 SetCreeper 
	endif
crpl/docs/else.1412190170.txt.gz · Last modified: 2015/03/19 14:41 (external edit)