You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/common-concepts/functions/index.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -219,4 +219,9 @@ let myFunction: fn(int, int): int
219
219
```
220
220
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.
221
221
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