s |
focus search bar ( enter to select, ▲ / ▼ to change selection) |
g e |
go to examples |
g m |
go to modules |
g o |
go to overview |
g r |
go to reference |
h |
toggle this help ( esc also exits) |
Any
Any
is a more informative and type-safe version of void
pointer. 1
All value types can be implicitly cast to type Any
.
x : Any = 3.0;
printf("x contains this float: %f\n", *cast(x.value_pointer, ^float));
x = "foo";
printf("now x contains this string: %s\n", *cast(x.value_pointer, ^string));
Any
is a type pointer for any type and a void pointer to the value. 2
type
- pointer to a Type_Info
struct with specific details about the assigned value typevalue_pointer
- void pointer to the valueAny
is a more informative and type-safe version of void
pointer.
“Demo: Run-Time (and Compile-Time) Type Information” YouTube, uploaded by Jonathan Blow, Feb 11, 2015, https://youtu.be/JoNkttD_MUs?t=754 ⮌
Any
is a type pointer for any type and a void pointer to the value.
“Demo: Run-Time (and Compile-Time) Type Information” YouTube, uploaded by Jonathan Blow, Feb 11, 2015, https://youtu.be/JoNkttD_MUs?t=895 ⮌
jailang
2019 pixeldroid
https://github.com/pixeldroid/jailang |
programming pages theme v0.5.21 (https://github.com/pixeldroid/programming-pages) |
s |
focus search bar ( enter to select, ▲ / ▼ to change selection) |
g e |
go to examples |
g m |
go to modules |
g o |
go to overview |
g r |
go to reference |
h |
toggle this help ( esc also exits) |