NEWTON
Asked
6 months ago
7
views
0
I am trying to get a better understanding of what the difference is between these two and when to use which
ㅤ This question was originally posted on Triality
0
'Let' effectively takes whatever is on the right side of the equals sign and replaces the left side with that. So let x = p + q + r actually will have x refer back to p + q + r every time x is accessed in the future.
'Tempvar' stores the intermediate value of the right side of the equation to the temporary variable on the left. So tempvar x = p + q + r (where p =1, q = 2, r = 3) will actually have 6 store the value of 6.
ㅤ This answer was originally posted on Triality
answered
6 months ago
Cairo: let vs tempvar what is the difference?
What does ret do in Cairo?
Cairo: Difference between amount and gas_fee
Cairo: When do you use tempvar and when do you use local
What is the difference between tempvar/let in Cairo Lang? How to use allow_locals and local?
Declaring Strings in Cairo
What’s the difference between Account Abstraction (AA) and Externally Owned Accounts (EOA)?
Has anyone had `get_caller_address` problems in devnet ?
What Implicit arguments are in Cairo lang?
How do I create my own account abstraction using starknetjs?
ApeWorX: How do I fund newly created accounts from the ape console?
Is it possible to use ArgentX to sign in user to a off-chain api/db?
Is Kakarot zkEVM a blockchain?
My Alchemy dashboard usage is low?