GSAK (Geocaching Swiss Army Knife)
Contents - Index

Include (command)

INCLUDE <File=FileName> [FileChceck=Y|N]

Use this command to insert common code into a macro. It is similar, but not the same in function to the MACRO command. Instead, the command will replace this line of code with the contents of the specified file. Consider it exactly the same as if you copy then pasted the code into the original macro at this position. However, the macro file itself is not actually updated - just the contents in memory that GSAK runs. This will allow you to keep code libraries of subroutines in a single file, then get access to them via this single command. Subroutines are not global in scope, hence you can't do this same thing via the GOSUB command. 

FileName -  A fully qualified path to the file name allows the file to reside in any folder. However, relative paths (relative to your "macro" folder) are also supported. The file name  must be a literal and not a variable, as the INCLUDE command is processed by the macro pre processor (before any code is actually run) and macro variables are not resloved in this phase.

FileCheck - Y = The macro will throw an error if the file does not exist. If using wildcards then an error is thrown if the number of files matching the wildcard is zero. N = All errors are ignored and the macro continues without error 

Alpha List         Category List

Copyright 2004-2014 CWE Computer Services  
Privacy Policy Contact