.. index:: HDF5; examples .. _native-HDF5-Examples: =================================================== Example NeXus C programs using native HDF5 commands =================================================== C-language code examples are provided for writing and reading NeXus-compliant files using the native HDF5 interfaces. These examples are derived from the simple NAPI examples for :ref:`writing ` and :ref:`reading ` given in the :ref:`Introduction ` chapter. Compare these code examples with :ref:`NAPI-Examples`. .. _code_native.writing: Writing a simple NeXus file using native HDF5 commands in C ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. literalinclude:: nxh5write.c :tab-width: 4 :linenos: :language: guess .. _code_native.reading: Reading a simple NeXus file using native HDF5 commands in C ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. literalinclude:: nxh5read.c :tab-width: 4 :linenos: :language: guess