| summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'content/fate_v1/computations/addresses/_index.md')
| -rw-r--r-- | content/fate_v1/computations/addresses/_index.md | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/content/fate_v1/computations/addresses/_index.md b/content/fate_v1/computations/addresses/_index.md index aafd0f1..ae052ca 100644 --- a/content/fate_v1/computations/addresses/_index.md +++ b/content/fate_v1/computations/addresses/_index.md @@ -1,18 +1,27 @@ --- title: Addresses --- -### VALUE ACCESS -{{< fatecode >}}(at [ADDRESS]){{< /fatecode >}} -Returns the variable at `[ADDRESS]`. +Addresses are values that indicate where in the memory some other value is +located. They can thus be used to pass around an indication of where to modify +a value. + +### VALUE ACCESS +{{< fatecode >}}(at [address: (POINTER X)]){{< /fatecode >}} +Returns the `[X]` value at `[address]`. The returned value can act as a +reference. -### ALLOCATION -{{< fatecode >}}(new [TYPE]){{< /fatecode >}} +**Examples:** `(at my_ptr_var)`, `(at (ptr my_var))` -Returns the address of a new variable of type `[TYPE]`. Don't forget to call -`free` on it once you're done. +**Aliases:** `at`. ### ADDRESS -{{< fatecode >}}(ptr [COMPUTATION VARIABLE]){{< /fatecode >}} +{{< fatecode >}}(ptr [X]){{< /fatecode >}} Returns the address of `[COMPUTATION VARIABLE]`. + +**Examples:** `(ptr my_var)` + +**Aliases:** `address_of`, `addressof`, `addressOf`, `address`, `addr`, +`pointer_to`, `pointerto`, `pointerTo`, `pointer`, `ptr`, `reference_to`, +`referenceto`, `referenceTo`, `reference`, `ref`. |


