GSAK (Geocaching Swiss Army Knife)
 

Contents - Index


Repeat (command)

Repeat

Use this command to repeat a sequence of statements until a certain condidtion exists. Basically it is very similar to the While command, the main difference is that your loop is *always* executed at least once. While still has it's uses but many programmers find the repeat/until construct more intuitive - and easier to follow in many circimstances.

Repeat statements can be nested, but every Repeat statement must have a matching Until statement. Use BreakRepeat to break out of the Repeat loop

Use Until <expression> to complete the loop.  The expression used must return a Boolean true or false value. 

Example:
 

$data = GetFile("c:\temp\test.csv")
$rows = Val(CsvGet($data,"rows"))
$x = 0
Repeat
  $x = $x + 1
  $col3 = CsvGet("*","$x,3")
  // do what ever you want with $col3
Until $x = $rows

 

Alpha List         Category List


Copyright 2004-2011 CWE Computer Services  
Privacy Policy Contact