nomsu/lib/core/io.nom

22 lines
607 B
Plaintext
Raw Normal View History

#!/usr/bin/env nomsu -V7.0.0
###
2018-06-14 22:17:26 -07:00
This file contains basic input/output code
use "core/metaprogramming"
use "core/operators"
use "core/control_flow"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
external:
(say (*extra arguments*)) means:
for $ in (1 to (select "#" (*extra arguments*))):
$arg = (select $ (*extra arguments*))
$io.write ($arg as text)
$io.write "\n"
$io.flush()
(say $message inline) means ($io.write $message)
(ask $prompt) means:
$io.write $prompt
return ($io.read())