fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 245: Print value of custom type
Idiom # 245: Print value of custom type
See
programming-idioms.org
:
Code
say x # it usually helps if x's type redefined 'as_string'
What are effects?
Running Example
ex245 is T1 is a := 42 b := "Hello" x0 := T1 say x0 # output is much more useful if as_string is redefined T2 is a := 42 b := "Hello" redef as_string => "T $a $b" x1 := T2 say x1
What are effects?
last changed: 2024-07-01
next: Idiom # 246: Count distinct elements