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 06_ArrayAndStruct/ArrayAndStruct.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ contract StructTypes {
// 给结构体赋值
// 方法1:在函数中创建一个storage的struct引用
function initStudent1() external{
Student storage _student = student; // assign a copy of student
Student storage _student = student; // assign a reference to student
_student.id = 11;
_student.score = 100;
}
Expand Down
2 changes: 1 addition & 1 deletion 06_ArrayAndStruct/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Student student; // 初始一个student结构体
// 给结构体赋值
// 方法1:在函数中创建一个storage的struct引用
function initStudent1() external{
Student storage _student = student; // assign a copy of student
Student storage _student = student; // assign a reference to student
_student.id = 11;
_student.score = 100;
}
Expand Down
2 changes: 1 addition & 1 deletion Languages/en/06_ArrayAndStruct_en/ArrayAndStruct.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ contract StructTypes {
// assign value to structure
// Method 1: Create a storage struct reference in the function
function initStudent1() external{
Student storage _student = student; // assign a copy of student
Student storage _student = student; // assign a reference to student
_student.id = 11;
_student.score = 100;
}
Expand Down
2 changes: 1 addition & 1 deletion Languages/en/06_ArrayAndStruct_en/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ You can define new types in the form of `struct` in Solidity. Elements of `struc
// assign value to structure
// Method 1: Create a storage struct reference in the function
function initStudent1() external{
Student storage _student = student; // assign a copy of student
Student storage _student = student; // assign a reference to student
_student.id = 11;
_student.score = 100;
}
Expand Down
2 changes: 1 addition & 1 deletion Languages/ja/06_ArrayAndStruct_ja/ArrayAndStruct.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ contract StructTypes {
// assign value to structure(構造体への値の代入)
// Method 1: Create a storage struct reference in the function(関数内でstorage型の構造体の参照を作成する)
function initStudent1() external{
Student storage _student = student; // assign a copy of student(構造体studentのコピーを代入する
Student storage _student = student; // assign a reference to student(構造体studentへの参照を代入する
_student.id = 11;
_student.score = 100;
}
Expand Down
2 changes: 1 addition & 1 deletion Languages/ja/06_ArrayAndStruct_ja/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Solidityにおいて、`struct`というフォーマットによって新しい
// Method 1: Create a storage struct reference in the function
//(方法1: 関数にてstorage型構造体の参照を作成する)
function initStudent1() external{
Student storage _student = student; // assign a copy of student
Student storage _student = student; // assign a reference to student
_student.id = 11;
_student.score = 100;
}
Expand Down
Loading