Skip to content

Commit 630ac5e

Browse files
committed
update functions
1 parent 22f61e1 commit 630ac5e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/common-concepts/functions/index.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,9 @@ let myFunction: fn(int, int): int
219219
```
220220
The example at above, is a variable definition with function data type. The compatible function values is a have two `int` parameter and returns `int` value.
221221

222-
The fact that functions can be used as data types makes it possible to use and store [anonymous functions and closures](/common-concepts/functions/anonymous-functions) with type safety.
222+
The fact that functions can be used as data types makes it possible to use and store [anonymous functions and closures](/common-concepts/functions/anonymous-functions) with type safety.
223+
224+
## Addresses and Conversions
225+
226+
When you need function address for low-level purposes, you can cast to the `uintptr` type.
227+
Casting functions to `uintptr`, gives the memory address of the function as integer.

0 commit comments

Comments
 (0)