Querying Dimension Information
Function Syntax
- Query the name and length of a dimension.
- Query the name of a dimension.
- Query the length of a dimension.
- Query a dimension ID by name.
Parameters
Parameter |
Description |
Value Range |
Input/Output |
|---|---|---|---|
ncid |
File ID |
Non-negative integer |
Input |
dimid |
Dimension ID |
Non-negative integer |
Input |
const *name |
Dimension name |
Non-empty string of less than 256 bytes |
Input |
*name |
Pointer to the dimension name |
Non-empty |
Output |
*lenp |
Pointer to the dimension length |
Non-empty |
Output |
*idp |
Pointer to the dimension ID |
Non-empty |
Output |
Return Value
- Success: NC_NOERR
- Failure: An error code is returned.
Error Code
Error Code |
Description |
|---|---|
NC_EBADID |
Invalid ncid |
NC_EBADDIM |
Invalid dimid |
Notes
*name, *lenp, and *idp can be null pointers only if no data needs to be obtained.
Parent topic: Information Query