User Tools

Site Tools


remove_delete_a_source_file_.htm
Navigation:  Templates > Template Language Reference > Complete Alpha Listing >====== #REMOVE (delete a source file) C6H0068.jpg ====== Previous pageReturn to chapter overviewNext page

#REMOVE( file )

blk2blue.jpg

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

The #REMOVE statement deletes the specified source output file. If the file does not exist, #REMOVE is ignored and source generation continues.

Example:

#FOR(%Module)

  #SET(%TempModuleFile,(%Module & '.$$$'))           #!Set temp module file

  #CREATE(%TempModuleFile)                           #!Create temp module file

  #FOR(%ModuleProcedure)                             #!For all procs in module

     #FIX(%Procedure,%ModuleProcedure)               #!Fix current procedure

     #GENERATE(%Procedure)                           #!Generate procedure code

  #ENDFOR                                            #!EndFor all procs in module

  #SET(%ModuleFile,(%Module & '.CLW'))               #!Set to current module file

  #CREATE(%ModuleFile)                               #!Create module file

  #GENERATE(%Module)                                 #!Generate module header

  #APPEND(%TempModuleFile)                           #!Add generated procedures

  #REMOVE(%TempModuleFile)                           #!Delete the temporary file

#ENDFOR

remove_delete_a_source_file_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1