---
title: GetFormatName
description: "根据传入的Format类型，获取Format的字符串描述。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00506.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00506.html
indexId: 543577972efe03d101e0f407862e9fcbffa60398ec00744c071db7ea70f641e378
---
# GetFormatName

#### 函数功能

根据传入的Format类型，获取Format的字符串描述。


#### 函数原型

```
const char_t *GetFormatName(Format format)
```


#### 参数说明

| 参数 | 输入/输出 | 说明 |
| --- | --- | --- |
| format | 输入 | Format枚举值。 |


#### 返回值

该Format所对应的字符串描述，若Format不合法或不被识别，则返回nullptr。


#### 异常处理

无。


#### 约束说明

返回的字符串不可被修改。
