Monday December 18, 2017

       
      SteelArrow Basics
      SteelArrow Tags
  SteelArrow Functions
  SteelArrow Objects
  Advanced Topics
  WAS Overview
   
   
       
      Overview
  Code Samples
  Site Search
   
   
   


Get SteelArrow!     
  <SALOOP>    
 
 
 
Return to Tag List
 
The LOOP tag aids in program flow. The tag is similar to WHILE in that it allows a script to loop over a block of code a number of times, or until an expression evaluates to FALSE.
 
Attributes:
FROMstart value (index)
TOend value (index)
NAMEindex name
CONDexpression to evalutate (not required)
CONDITIONsame as COND
NOCASEflag denoting case-insensitive string compare

 
The following is an example of LOOP;
 
<!--- Create a LIST object containing 12,34,56,78 --->
<SASET NAME=list VALUE=MakeList( ":", "12:34:56:78" )>

<!--- Output list contents --->
<SALOOP COND=list.MoreData()>
   <SAOUTPUT VALUE=list><BR>
   <SANEXT NAME=list>
</SALOOP>

<!--- Output list contents --->
<SALOOP FROM=0 TO=list.RowCount() NAME=index>
   <SAOUTPUT VALUE=list[index]><BR>
</SALOOP>

<!--- Mixed LOOP; only outputs 5 values --->
<SASET NAME=count VALUE=5>
<SALOOP FROM=0 TO=list.RowCount() COND=count.gt.i NAME=i>
   <SAOUTPUT VALUE=list[i]><BR>
</SALOOP>





Copyright © 1998-2004 Tomahawk Technologies Inc.
Privacy Policy