HDF5 binary file in Delphi, ARRAY (VLARRAY) TYPE


Hello everybody,

Can somebody show me an example on how to create an array element consisting of 3 values in brackets, separated by comma, looking like this:

(1, 10, 3)

Hopefully here you can see the image snipped from HDF5 View:



The code doesn’t have to be in Delphi, C++ or any other is fine.


Hi @kostadinovigor,

Looking at the screenshot, it seems that you are dealing with a variable-length dataset of type integer. If the conclusion is correct, here is an example which illustrates how to create such dataset using HDFql in C++:

// create an HDF5 file named 'test.h5' and use (i.e. open) it 
HDFql::execute("create and use file test.h5");

// create a variable-length dataset named 'dset' of type int with some initial values stored in it
HDFql::execute("create dataset dset as varint(5) values((0,1,2), (0,2,3), (0,3,4), (0,4,5), (0,5,6))");

FYI, you can also use HDFql in C, Java, Python, C#, R and Fortran with minimal changes to the code snippet above.