OPTIONS "C_CALL LABELCHECK"
LIBRARY rxzip
ziperr = "SYNTAX"
zipheading = 1
CHAROUT("data1.txt", "This is some data." || "0D0A0D0A"x || "This is line two."|| "0D0A"x)
LINEOUT("data1.txt")
CHAROUT("data2.txt", "This is a test of the RxZip add-on dll." || "0D0A0D0A"x || "Hopefully this worked!"|| "0D0A"x)
LINEOUT("data2.txt")
DO
zipcreate("ZipHandle", "test.zip")
zipadd(ziphandle, "data1.txt")
zipadd(ziphandle, "data2.txt")
CATCH SYNTAX
CONDITION('M')
FINALLY
IF EXISTS("ZIPHANDLE") THEN zipclose(ziphandle)
DELETEFILE("data1.txt")
DELETEFILE("data2.txt")
END
|