fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 267: Pass string to argument that can be of any type
Idiom # 267: Pass string to argument that can be of any type
See
programming-idioms.org
:
Code
foo (x Any) => if x.dynamic_type.name = "Const_String" say x
What are effects?
Running Example
ex267 is foo (x Any) => if x.dynamic_type.name = "Const_String" say x foo "Hello, world!" foo 42
What are effects?
last changed: 2024-07-01
next: Idiom # 268: User-defined operator