Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/lv4-const-n-var/const.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ int main() {

!> SysY 中 “常量” 的定义和 C 语言中的定义有所区别: SysY 中, 所有的常量必须能在编译时被计算出来; 而 C 语言中的常量仅代表这个量不能被修改.
<br><br>
SysY 中的常量有些类似于 C++ 中的 `consteval`, 或 Rust 中的 `const`.
SysY 中的常量在概念上更接近于 C++ 中的 `constexpr` 或 Rust 中使用 `const` 定义的编译期常量。

## IR 生成

Expand Down
2 changes: 1 addition & 1 deletion docs/misc-app-ref/sysy-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ const int e[4][2] = {{1, 2}, {3, 4}, {5, 6}, {7, 8}};

!> SysY 中 “常量” 的定义和 C 语言中的定义有所区别: SysY 中, 所有的常量必须能在编译时被计算出来; 而 C 语言中的常量仅代表这个量不能被修改.
<br><br>
SysY 中的常量有些类似于 C++ 中的 `consteval`, 或 Rust 中的 `const`.
SysY 中的常量在概念上更接近于 C++ 中的 `constexpr` 或 Rust 中使用 `const` 定义的编译期常量。

Comment thread
LiAuTraver marked this conversation as resolved.
### 变量定义

Expand Down
Loading