$ include "seed7_05.s7i"; $ include "getf.s7i"; $ include "time.s7i"; const string: noteFileName is "NOTES.TXT"; const proc: main is func local var file: note is STD_NULL; begin if length(argv(PROGRAM)) = 0 then # write NOTES.TXT write(getf(noteFileName)); else # Write date & time to NOTES.TXT, and then arguments note := open(noteFileName, "a"); if note <> STD_NULL then writeln(note, truncToSecond(time(NOW))); writeln(note, "\t" <& join(argv(PROGRAM), " ")); close(note); end if; end if; end func;