2 ms·
Nope. And they're not really. Imagine a simple computer with, say, 32 bytes of ram. All our bytes of ram are numbered. We read a value from byte number 8 and t
by phaemon 6y ago
Nope. And they're not really. Imagine a simple computer with, say, 32 bytes of ram.
All our bytes of ram are numbered. We read a value from byte number 8 and that value is 17.
"Byte number 8" is a pain to remember or calculate so we give it a label and let the computer keep track. That's a "variable".
What does that 17 mean though? Is it a value we want to use later on? It might be. Or it could be referring to Byte 17 in our ram. Byte 17 happens to have the value 42 so if we use Byte 8 as a pointer that's the value we end up with.
But it's entirely our choice. It's just a number and we can treat it as a value or a pointer to another memory address as we like.