Creates a unique temporary file in the Genstat temporary folder.
||Prefix for the filename|
||Saves the filename|
||Saves the index number that follows the prefix in the filename|
%TEMPFILE creates a unique file in the Genstat temporary folder. The location of the temporary folder can be obtained by the
GETTEMPFOLDER procedure, and is set by the
%TEMP% environment variables on your computer. An empty file is created, so that other programs will not use the same name.
PREFIX parameter provides the text to be used at the start of the filename. The extension of the filename is always
.tmp. The unique filename is returned by the
FILENAME parameter, and the
INDEX parameter saves its index number. Note, the filename has the index value written in hexadecimal format, but the index is saved as an ordinary number. For example:
%TEMPFILE PREFIX='Out'; FILENAME=TFile; INDEX=filenumber
31 (31 in hexadecimal = 1F).
The file is not deleted automatically at the end of the Genstat run. So, when you have finished using it, you need to delete it yourself (for example, with the