[fpc-pascal] NULL pointer to array of integer

Marc Santhoff M.Santhoff at t-online.de
Wed Sep 13 10:04:40 CEST 2006


Hi,

while fiddling with some C'isms I've stumbled over a function in a
library expecting an array of integers *or* a NULL pointer.

How can I hand over any NIL or 0 or something equal to NULL in C that is
accepted by fpc?

Using NIL or 0 does not work certainly...


In code:

hsize_t = qword;

(*
hid_t H5Screate_simple(int rank, const hsize_t * dims, const hsize_t *
maxdims )

--> h2pas -->

*)

function H5Screate_simple(rank:longint; dims:array of hsize_t;
maxdims:array of hsize_t):hid_t;cdecl;external;

{ calling is done this way: }
(*
dataspace = H5Screate_simple(RANK, dimsf, NULL);
-->
*)

dimsf			: array[0..1] of hsize_t;

dataspace := H5Screate_simple(RANK, dimsf, ???);


TIA,
Marc





More information about the fpc-pascal mailing list