RosettaCodeData/Task/Delete-a-file/ALGOL-68/delete-a-file.alg

18 lines
375 B
Text
Raw Permalink Normal View History

2013-04-10 14:16:51 -07:00
main:(
PROC remove = (STRING file name)INT:
BEGIN
FILE actual file;
INT errno = open(actual file, file name, stand back channel);
IF errno NE 0 THEN stop remove FI;
scratch(actual file); # detach the book and burn it #
errno
EXIT
stop remove:
errno
END;
remove("input.txt");
remove("/input.txt");
remove("docs");
remove("/docs")
)