2

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?

QQQ
  • 31
  • 3

1 Answers1

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