GSAK (Geocaching Swiss Army Knife)
Contents - Index

BeginSub (command)

BEGINSUB <Name=SubrName>

Denotes the beginning of a subroutine. A subroutine is a block of code that you wish to reuse. You call the block of code with the GoSub command.
Note: global scoping of subroutines is not supported (for example, trying to use subroutines from another macro file opened with the MACRO command). Subroutines are only available in the macro file they are defined.

$x = 0
$y = 0
Gosub Name=Add10
Gosub Name=Add10
# now $x = 20 and $y = 20

BeginSub Name=Add10
  $x = $x + 10
  $y = $y + 10

Related:  GoSub ExitSub EndSub
Alpha List         Category List

Copyright 2004-2016 CWE Computer Services  
Privacy Policy Contact