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 Languages/es/06_ArreglosyEstructuras_es/ArrayAndStruct.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ contract StructTypes {
// Asignar el valor a una struct
// Método 1: Se crea una referencia storage struct en la función
function initStudent1() external{
Student storage _student = student; // Asignar una copia de estudiante
Student storage _student = student; // Asignar una referencia al estudiante
_student.id = 11;
_student.score = 100;
}
Expand Down
2 changes: 1 addition & 1 deletion Languages/es/06_ArreglosyEstructuras_es/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Hay 4 maneras de asignar valores a un `struct`:
// Asignar el valor a una struct
// Método 1: Se crea una referencia storage struct en la función
function initStudent1() external{
Student storage _student = student; // Asigna una copia de student
Student storage _student = student; // Asigna una referencia a student
_student.id = 11;
_student.score = 100;
}
Expand Down
3 changes: 2 additions & 1 deletion Languages/pt-br/06_ArrayAndStruct/ArrayAndStruct.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ contract StructTypes {
uint256 id;
uint256 score;
}
Student student; // Inicializar uma struct Student
// Inicialize uma estrutura de dados chamada "student"
// Atribuindo valores a uma estrutura
// Método 1: Criar uma referência struct para storage dentro da função
function initStudent1() external{
// atribuir uma cópia do estudante
Student storage _student = student; // atribuir uma referência à struct student
_student.id = 11;
_student.score = 100;
Comment thread
yuyua9 marked this conversation as resolved.
}
Expand Down
2 changes: 1 addition & 1 deletion Languages/pt-br/06_ArrayAndStruct/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Há quatro maneiras de atribuir valores a uma struct:
// Atribuir valores a uma struct
// Método 1: Criar uma referência struct storage dentro da função
function initStudent1() external {
Student storage _student = student; // atribuir uma cópia da struct student
Student storage _student = student; // atribuir uma referência à struct student
_student.id = 11;
_student.score = 100;
}
Expand Down
Loading