fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 5: Create a 2D Point data structure
Idiom # 5: Create a 2D Point data structure
See
programming-idioms.org
:
Code
Using a feature
point(x, y f64).
What are effects?
Using a tuple
tuple f64 f64
What are effects?
Running Example
To create instances, use this code
ex5 is point(x, y f64). p1 := point 3 4 p2 := (3.0, 4.0) p3 := point p2.0 p2.1
What are effects?
last changed: 2024-07-01
next: Idiom # 6: Iterate over list values