|GSAK (Geocaching Swiss Army Knife)|
Quote(sData) : string
Use to output a string with double quotes
As double quotes are used to denote a string literal, you can't explicitly have them inside a string literal. This function will help overcome situations where you need to output double quotes via a GSAK variable. The primary use is for the creation of variables to be used in the PutFile, AppendFile, and TextOut functions. The Quote function and $_Quote system variable both output chr(34) [the ascii character value for the double quote]. This is all done for you under the covers, so you shouldn't have to worry about it. For example the TextOut command allows output of CSV files, however there are some situations where some of the numeric fields need to be output without quotes where and the string fields must be output with quotes. Let us say you wanted the Longitude and Latitude output without surrounding them in double quotes you would use the following code:
The use of none in the second parameter stops all fields from having double quotes. So for the string fields we do want surrounded by double quotes we use the Quote function.
Related: Putfile() AppendFile() TextOut()
Alpha List Category List
Copyright 2004-2016 CWE Computer Services |