括号层级
生成代码的括号样式
模型配置窗格: 代码生成 / 代码样式
描述
指定生成的代码的括号样式。
设置
标准 (优化以便于阅读) (默认) | 最少 (依赖 C/C++ 运算符确定优先级) | 标准 (按标准规范使用括号) | 最多 (用括号指定优先级)
默认值:标准 (优化以便于阅读)
示例
推荐的设置
| 应用情形 | 设置 |
|---|---|
| 调试 | 标准 (优化以便于阅读) |
| 可追溯性 | 标准 (优化以便于阅读) |
| 效率 | 最少 (依赖 C/C++ 运算符确定优先级) |
| 安全预警 | 无建议 |
编程用法
参数:ParenthesesLevel |
| 类型:字符向量 |
值: 'Minimum' | 'Nominal' | 'Standards' | 'Maximum' |
默认值:'Nominal' |
版本历史记录
在 R2006b 中推出
1 ANSI is a registered trademark of the American National Standards Institute, Inc.
2 MISRA is a registered trademarks of MIRA Ltd, held on behalf of the MISRA Consortium.