Difference between revisions of "TMPNAM()"

From Recital Documentation Wiki
Jump to: navigation, search
(Description)
Line 7: Line 7:
  
 
==See Also==
 
==See Also==
[[GETENV()]], [[GETGID()]], [[GETUID()]], [[GETPID()]], [[RAND()]]
+
[[DB_TMPDIR]], [[GETENV()]], [[GETGID()]], [[GETUID()]], [[GETPID()]], [[RAND()]], [[SET TMPDIR]], [[SET TMPNAMPATH]]
  
  
 
==Description==
 
==Description==
 
The TMPNAM() function returns a character string containing a unique temporary filename.  By default, filenames returned by the TMPNAM() function have the extension ".tmp".  The TMPNAM() function is particularly useful in multi-user applications where a unique temporary file can be created for each user process. The optional argument <expC1> specifies a directory where the temporary filename will created. The optional  argument <expC2> specifies a file extension to use other than the default one of '.tmp'.
 
The TMPNAM() function returns a character string containing a unique temporary filename.  By default, filenames returned by the TMPNAM() function have the extension ".tmp".  The TMPNAM() function is particularly useful in multi-user applications where a unique temporary file can be created for each user process. The optional argument <expC1> specifies a directory where the temporary filename will created. The optional  argument <expC2> specifies a file extension to use other than the default one of '.tmp'.
 +
  
 
==Example==
 
==Example==

Revision as of 09:21, 27 July 2011

Purpose

Function to return temporary file name function


Syntax

TMPNAM( [<expC1> [,<expC2>]] )

See Also

DB_TMPDIR, GETENV(), GETGID(), GETUID(), GETPID(), RAND(), SET TMPDIR, SET TMPNAMPATH


Description

The TMPNAM() function returns a character string containing a unique temporary filename. By default, filenames returned by the TMPNAM() function have the extension ".tmp". The TMPNAM() function is particularly useful in multi-user applications where a unique temporary file can be created for each user process. The optional argument <expC1> specifies a directory where the temporary filename will created. The optional argument <expC2> specifies a file extension to use other than the default one of '.tmp'.


Example

name = tmpnam( tmpdir(), ".txt")
report form Listing for event = "BALLET" to file &name
print &name
delete file &name

Products

Recital, Recital Server