summaryrefslogtreecommitdiffstats
path: root/doxygen/examples/H5LT_examples.c
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2022-07-26 19:30:04 (GMT)
committerGitHub <noreply@github.com>2022-07-26 19:30:04 (GMT)
commitd0739f13c131fd8d85c4b3247c26ca2bca515ece (patch)
treea70ce4e47b6689ae6b9aa5d47c9e143347998a97 /doxygen/examples/H5LT_examples.c
parent6eaa59d2f83a89e9b4808f04caa48d313e658df1 (diff)
downloadhdf5-d0739f13c131fd8d85c4b3247c26ca2bca515ece.zip
hdf5-d0739f13c131fd8d85c4b3247c26ca2bca515ece.tar.gz
hdf5-d0739f13c131fd8d85c4b3247c26ca2bca515ece.tar.bz2
Revert "1.12 eliminate unnecessary errors in the error stack (#1880)" (#1935)
This reverts commit f6997681335f0b5fe2e8904f9108a71c5200fb2d.
Diffstat (limited to 'doxygen/examples/H5LT_examples.c')
-rw-r--r--doxygen/examples/H5LT_examples.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/doxygen/examples/H5LT_examples.c b/doxygen/examples/H5LT_examples.c
new file mode 100644
index 0000000..5ed4c29
--- /dev/null
+++ b/doxygen/examples/H5LT_examples.c
@@ -0,0 +1,27 @@
+/* -*- c-file-style: "stroustrup" -*- */
+
+//! <!-- [get_attribute_info] -->
+
+H5T_class_t type_class;
+size_t type_size;
+hsize_t dims[0];
+... status = H5LTget_attribute_info(file_id, "/", STRNAME, dims, &type_class, &type_size);
+if (type_class == H5T_STRING) {
+ printf("Attribute is a string.\n");
+ printf("String size: %i\n", type_size);
+
+ //! <!-- [get_attribute_info] -->
+
+ //! <!-- [enum] -->
+
+ “H5T_ENUM
+ {
+ H5T_NATIVE_INT;
+ “Bob” 0;
+ “Elena” 1;
+ “Quincey” 2;
+ “Frank” 3;
+ }
+ ”
+
+//! <!-- [enum] -->