Routines (alphabetical) > Routines: H > HDF5 Routines > H5R_CREATE

# H5R_CREATE

The H5R_CREATE function creates a reference to either an object or a dataspace region of a dataset.

## Example

See the example under H5F_CREATE.

## Syntax

Result = H5R_CREATE(Loc_id, Name [,DATASPACE_ID=value])

## Return Value

The Result is the reference pointing to the specified object. It is returned as either an integer, if an object reference is returned, or a named structure, if a dataspace region reference is returned.

## Arguments

### Loc_id

An integer giving the identifier used to locate the object being pointed to. This is the identifier of the object containing Name.

### Name

The name of the object contained within Loc_id.

## Keywords

### DATASPACE_ID

An integer giving the identifier of the selection. Use of this keyword will create a dataspace region reference. If not supplied then an object reference will be created.

## Version History

6.2 | Introduced

## See Also

H5S_CREATE_SIMPLE