User Tools

Site Tools


crpl:docs:else

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
crpl:docs:else [2013/01/14 14:10] – external edit 127.0.0.1crpl:docs:else [2015/03/19 23:28] (current) Karsten75
Line 1: Line 1:
 +<- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#flow_control|Flow Control]]
 =====  else  ===== =====  else  =====
  
Line 10: Line 10:
 === Examples === === Examples ===
 <code> <code>
-# Pick a random number. If the random number is less than 95 emit  +# Pick a random integer between 0(inclusive) and 100(exclusive). 
-10 Creeper, otherwise emit 100 Creeper  +If the random number is less than 95 emit 10 Creeper, 
-0 100 RandInt lt if  +otherwise emit 100 Creeper. 
- CurrentCoords 10 SetCreeper +0 100 RandInt 95 lt if  
 + CurrentCoords 10 AddCreeper 
  else   else 
- CurrentCoords 100 SetCreeper + CurrentCoords 100 AddCreeper 
  endif  endif
 </code>  </code> 
- 
  
crpl/docs/else.1358190600.txt.gz · Last modified: 2014/10/01 15:02 (external edit)