home *** CD-ROM | disk | FTP | other *** search
- PROGRAM test;
-
- {Test/demo for unit heapstr}
-
-
- USES
- heapstr;
-
-
- VAR
- st: heap_string;
-
-
- PROCEDURE report;
- BEGIN
- Writeln ('Maxavail = ', MaxAvail:6, ' st = "', st.value, '"');
- END;
-
-
- BEGIN {test}
- st.init;
- report;
- IF NOT st.store ('This is a string') THEN RunError;
- report;
- IF NOT st.store ('This is a different string') THEN RunError;
- report;
- st.dispose;
- report
- END.
-