Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AmazingAng authored Oct 19, 2024
1 parent b8571df commit ded02bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 03_Function/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function <function name>(<parameter types>) {internal|external|public|private} [

**注意 1**:合约中定义的函数需要明确指定可见性,它们没有默认值。

**注意 2**`public|private|internal` 也可用于修饰状态变量(定义可参考[变量的存储和作用域](../05_DataStorage/readme.md#1-状态变量))。`public`变量会自动生成同名的`getter`函数,用于查询数值。未标明可见性类型的状态变量,默认为`internal`
**注意 2**`public|private|internal` 也可用于修饰状态变量(定义可参考[WTF Solidity 第5讲的相关内容]([../05_DataStorage/readme.md#1-状态变量](https://github.com/AmazingAng/WTF-Solidity/tree/main/05_DataStorage#1-%E7%8A%B6%E6%80%81%E5%8F%98%E9%87%8F)))。`public`变量会自动生成同名的`getter`函数,用于查询数值。未标明可见性类型的状态变量,默认为`internal`

5. `[pure|view|payable]`:决定函数权限/功能的关键字。`payable`(可支付的)很好理解,带着它的函数,运行的时候可以给合约转入 ETH。`pure``view` 的介绍见下一节。

Expand Down

0 comments on commit ded02bc

Please sign in to comment.