User Tools

Site Tools


xrpl:while

Differences

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

Link to this comparison view

xrpl:while [2019/03/04 01:27] – created Karsten75xrpl:while [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
- 
-=====  while  ===== 
- 
-^Arguments^Result^Notation^ 
-| | | [ - ] | 
- 
- 
-=== Description === 
-Beginning of a while loop. The statements between a 'while' and a 'repeat' should ultimately push a value to the stack that will determine if the loop executes the body of the 'repeat' block.  
- 
-=== Examples === 
-<code prpl>5 -> 
-while  
- <-y gt(0) #is y greater than zero?  
-repeat #repeat this section of code  
- trace(<-y)  
- <-y sub(1) ->y #subtract 1 from y so we don't end in infinite loop  
-endwhile  
-</code> 
  
xrpl/while.1551662838.txt.gz · Last modified: 2025/02/14 14:56 (external edit)