Category : Pascal Source Code
Archive   : HEAPST10.ZIP
Filename : TEST.PAS

 
Output of file : TEST.PAS contained in archive : HEAPST10.ZIP

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.