RosettaCodeData/Task/Delete-a-file/ALGOL-68/delete-a-file.alg
2023-07-01 13:44:08 -04:00

17 lines
375 B
Text

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")
)