Pointer Dereferencing: Better example of pointers
commited
commit
e9ce844a5885f1bd4e30e6fc40543293eda04ddd
... | ... | @@ -33,7 +33,7 @@ The same applies in case of joining. The script in image C counts as 4 scripts, |
33 | 33 |  |
34 | 34 | |
35 | 35 | ### Pointer Dereferencing |
36 | This section will be easier to understand if you are somewhat familiar with the concept of pointers. If you are not, you can think of them as an address to somewhere a value is stored. |
|
36 | This section will be easier to understand if you are somewhat familiar with the concept of pointers. If you are not, you can think of them as an address. Specifically, a memory address, that points to a variable. |
|
37 | 37 | When a pointer is dereferenced, i.e. converted to value, it counts as 1 script. In image E, the Get Variable block outputs a pointer, which is then dereferenced to a value for the Negate block. Thus the script adds 3 scripts (2 script blocks + 1 pointer dereference) to the counter. |
38 | 38 |  |
39 | 39 |