The task is to create a new file called "TAPE.FILE" of any size on Magnetic Tape.

$ include "seed7_05.s7i";
 
const proc: main is func
  local
    var file: tapeFile is STD_NULL;
  begin
    tapeFile := open("/dev/tape", "w");
    if tapeFile = STD_NULL then
      tapeFile := open("tape.file", "w");
    end if;
    if tapeFile <> STD_NULL then
      writeln(tapeFile, "Hello, world!");
      close(tapeFile);
    else
      writeln(" ***** Cannot open tape file.");
    end if;
  end func;