mirror of
https://github.com/AleoHQ/leo.git
synced 2024-11-30 09:42:43 +03:00
11 lines
169 B
Plaintext
11 lines
169 B
Plaintext
|
// Adding the `mut` keyword makes a circuit variable mutable.
|
||
|
circuit Circ {
|
||
|
x: u32
|
||
|
}
|
||
|
|
||
|
function main() -> u32 {
|
||
|
let mut a = Circ { x: 1 };
|
||
|
a.x = 0;
|
||
|
|
||
|
return a.x
|
||
|
}
|