#CREATE (create source file) 

Top  Previous  Next

 

#CREATE( file )

#CREATE

Creates a disk file to receive generated source code.

file

A string constant, template symbol, or expression containing a DOS file specification. This may be a fully qualified DOS pathname.

The #CREATE statement creates a disk file to receive the source code generated by #GENERATE. If the file does not exist, it is created. If the file already exists, it is opened and emptied (truncated to zero length). If the file is already open, a source generation error is produced.

The file is automatically selected as the active source output destination. Any file that is created must be closed with a #CLOSE statement.

Example:

#SET(%NewProgramFile,(%Application & '.$$$'))    #!Temp new program filename

#CREATE(%NewProgramFile)                         #!Create new program file

#GENERATE(%Program)                              #!Generate main program header

 

See Also:     #CLOSE