GSAK (Geocaching Swiss Army Knife)
Contents - Index

GoTo (command)

GOTO <POSITION=Top|Bottom|Next|Previous|nn> [<OnError=Abort|Ignore>]

Position the record in the current table

Top = Top or the first record in the current sub set
Bottom = Bottom or last record in the current sub set
Next = The next record in the current subset
Previous = The previous record in the current subset
nn = number of records to skip (relative to the current record - use negative values to move backwards)

Note: Any position that would take you outside the current subset will set the system variable $_EOL to true. For example if you were on the last waypoint and used "Position=Next" or the First waypoint and used "Position=Previous"

OnError - Action to take if the position= token tries to move to a non-existent position in the table. Abort - You get an error message and the macro aborts. Ignore - the error is ignored, you are left at the current waypoint, and the macro continues to execute the next instruction.

Example: Loop through the current grid and stop at the first record that has a difficulty of 5
 

Goto Position=Top
While not($_Eol)
   If $d_Difficulty = 5
      cancel
   Endif
   Goto Position=Next
EndWhile
If $d_Difficulty <> 5
  msgok msg="No Difficulty 5 cache found"
Endif
 

 
Alpha List         Category List

Copyright 2004-2019 CWE Computer Services  
Privacy Policy Contact