6.8.7CLOSE GROUP
Syntax
CLOSE GROUP
Description
Close the HDF5 group currently in use (i.e. opened). After closing it, the group currently in use will be “/” (i.e. the root of the HDF5 file). If no file is currently in use, no group is closed, and an error is raised.
Parameter(s)
None
Return
Nothing
Example(s)
# use (i.e. open) an HDF5 file named "my_file.h5"
USE FILE my_file.h5
# show (i.e. get) current working group (should return "/")
SHOW USE GROUP
# create an HDF5 group named "my_group"
CREATE GROUP my_group
# set group currently in use to "my_group" (more precisely "/my_group")
USE GROUP my_group
# show (i.e. get) current working group (should return "/my_group")
SHOW USE GROUP
# create an HDF5 dataset named "my_dataset" of data type double (more precisely "/my_group/my_dataset")
CREATE DATASET my_dataset AS DOUBLE
# set group currently in use to "/" (i.e. the root of the HDF5 file)
CLOSE GROUP
# show (i.e. get) current working group (should return "/")
SHOW USE GROUP
# create an HDF5 dataset named "my_dataset" of data type int (more precisely "/ my_dataset")
CREATE DATASET my_dataset AS INT