I'm new to Cairo and I want to know what is the difference when I write let x = 1; and tempvar x = 1;. Is there any difference in Cairo Lang between let and tempvar?
Asked
Active
Viewed 58 times
2
QQQ
- 31
- 3
1 Answers
0
Yes, there's a difference. The keyword let creates a reference that's resolved by the compiler while tempvar actually stores the variable in the stack using a specialized register called the ap pointer. You can find more information about it here
David Barreto
- 8,887
- 7
- 32
- 46