#include <oxstd.h>
#include "dhtfile.h"

#include "dhtfile.ox"

// current limitations:
// 1) only reading, not writing
// 2) slow because no simple function to determine file size

main()
{
    decl file = new DhtFile();

    file->OpenRead("iotest12"); // no extension
    file->Info();               // check to see what is read

    print("Moved to start of row ", file->Seekr(1), " (counting starts at 0)\n");
    print("Reading two rows:", file->Readr(2));

    print("Reading two+one column:", file->Readc(2) ~ file->Readc(1));

    print("Moved to start of 2nd column, column index: ", file->Seekc(1), " (counting starts at 0)\n");
    print("Reading two columns:", file->Readc(2));
    print("Reading one column (X7) by name:", file->Readv("X7"));

    delete file;
}

