Skip to content

Commit f371c1b

Browse files
Remove local variables from Cairo program
The python implementation takes the references, while our implementation doesn't allow taking references when it expects a constants. For this reason, the example doesn't work as is in our current implementation. To fix this, I changed the example to not receive the values as parameters.
1 parent 23f9eeb commit f371c1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cairo_programs/bad_programs/split_felt_bad_constants.cairo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ const MAX_LOW = 1;
33

44
func main() {
55
let value =1;
6-
hint_func(MAX_HIGH, MAX_LOW, value);
6+
hint_func(value);
77
return();
88
}
9-
func hint_func(MAX_HIGH: felt, MAX_LOW: felt, value: felt) -> (felt, felt) {
9+
func hint_func(value: felt) -> (felt, felt) {
1010
alloc_locals;
1111
local low: felt;
1212
local high: felt;

0 commit comments

Comments
 (0)