mini-open-close.red 295 B

123456789101112
  1. % MINI-OPEN-CLOSE.RED Some minimal User Level I/O routines:
  2. Procedure Open(FileName,How);
  3. If how eq 'Input then SystemOpenFileForInput FileName
  4. else if how eq 'OutPut then SystemOpenFileForOutPut FileName
  5. else IoError "Cant Open";
  6. Procedure Close N;
  7. IndependentCloseChannel N;
  8. end;