123456789101112131415161718 |
- do
- \ err := catch
- \ await { os::println 'Number a:' },
- \ str-a := await { os::scanln () },
- \ await { os::println 'Number b:' },
- \ str-b := await { os::scanln () },
- let sum? :=
- \ a := get str-a.{parse-float},
- \ b := get str-b.{parse-float},
- { Some (a + b) },
- switch sum?:
- case Some sum:
- { os::println { String sum } },
- case None:
- { os::println 'None' },
- end,
- { crash err };
|