Delete a file: Difference between revisions
Content added Content deleted
imported>Acediast (→{{header|COBOL}}: put DELETE FILE first because that's standard statement) |
imported>Acediast (→{{header|COBOL}}: verified to work with newest GnuCOBOL) |
||
Line 480: | Line 480: | ||
COBOL 2023 added a dedicated <code>DELETE FILE</code> statement. |
COBOL 2023 added a dedicated <code>DELETE FILE</code> statement. |
||
{{works with|Visual COBOL}} |
{{works with|Visual COBOL}} |
||
{{works with|GnuCOBOL}} |
|||
<syntaxhighlight lang="cobol"> IDENTIFICATION DIVISION. |
<syntaxhighlight lang="cobol"> IDENTIFICATION DIVISION. |
||
PROGRAM-ID. Delete-Files. |
PROGRAM-ID. Delete-Files. |
||
Line 505: | Line 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. |
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|Visual COBOL}} |
||
{{works with| |
{{works with|GnuCOBOL}} |
||
<syntaxhighlight lang="cobol"> IDENTIFICATION DIVISION. |
<syntaxhighlight lang="cobol"> IDENTIFICATION DIVISION. |
||
PROGRAM-ID. Delete-Files. |
PROGRAM-ID. Delete-Files. |
||
Line 515: | Line 516: | ||
CALL "CBL_DELETE_DIR" USING "/docs" |
CALL "CBL_DELETE_DIR" USING "/docs" |
||
GOBACK |
GOBACK. |
||
END PROGRAM Delete-Files.</syntaxhighlight> |
|||
=={{header|Common Lisp}}== |
=={{header|Common Lisp}}== |