2
0

TestWriter.Mod 448 B

1234567891011121314151617181920
  1. MODULE TestWriter;
  2. IMPORT Out, Texts;
  3. VAR
  4. T: Texts.Text;
  5. W: Texts.Writer;
  6. R: Texts.Reader;
  7. BEGIN
  8. NEW(T); Texts.Open(T, '');
  9. Texts.OpenWriter(W);
  10. Texts.WriteString(W, 'HELLO');
  11. Texts.WriteLn(W);
  12. Texts.WriteString(W, 'WORLD');
  13. Texts.WriteInt(W, 1512, 6);
  14. Texts.Write(W, '*');
  15. Texts.WriteInt(W, -1512, 6);
  16. Texts.Write(W, '*');
  17. Texts.WriteLn(W);
  18. Texts.Insert(T, 17, W.buf);
  19. Texts.Close(T, 'Data/TEXT2.TXT')
  20. END TestWriter.