flang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 120: Read integer from stdin
Idiom # 120: Read integer from stdin
See
programming-idioms.org
:
Code
n := io.stdin.read_line.val.parse_int.val
What are effects?
Running Example
ex120 is say "please type a number:" # no error handling is performed here # program crashes if user does not type a number n := io.stdin.read_line.val.parse_int.val say "got $n"
What are effects?
next: NYI: Idiom # 121: UDP listen and read