flang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 220: Create a tuple value
Idiom # 220: Create a tuple value
See
programming-idioms.org
:
Code
t := (2.5, "hello", -1)
What are effects?
Running Example
ex220 is t := (2.5, "hello", -1) (a,b,c) := t say "t consists of $a, $b, $c" p := t.values.0 q := t.values.1 r := t.values.2 say "t consists of $p, $q, $r" # NYI: syntactic sugar that does not work yet: # # s := t.0 # t := t.1 # u := t.2 # say "t consists of $s, $t, $u"
What are effects?
next: Idiom # 221: Remove all non-digits characters