Delete a file: Difference between revisions
m
→{{header|Wren}}: Changed to Wren S/H
imported>Acediast (→{{header|COBOL}}: put DELETE FILE first because that's standard statement) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
(One intermediate revision by one other user not shown) | |||
Line 480:
COBOL 2023 added a dedicated <code>DELETE FILE</code> statement.
{{works with|Visual COBOL}}
{{works with|GnuCOBOL}}
<syntaxhighlight lang="cobol"> IDENTIFICATION DIVISION.
PROGRAM-ID. Delete-Files.
Line 505 ⟶ 506:
However, in some implementations we need to use unofficial extensions to delete files, or if we want to delete directories. The following are built-in subroutines originally created as part of some of the COBOL products created by Micro Focus.
{{works with|Visual COBOL}}
{{works with|
<syntaxhighlight lang="cobol"> IDENTIFICATION DIVISION.
PROGRAM-ID. Delete-Files.
Line 515 ⟶ 516:
CALL "CBL_DELETE_DIR" USING "/docs"
GOBACK.
END PROGRAM
=={{header|Common Lisp}}==
Line 1,839 ⟶ 1,841:
Wren does not currently support the removal of directories.
<syntaxhighlight lang="
File.delete("input.txt")
|