123456789101112131415161718192021 | #!/usr/bin/env nomsu -V8.0.0
###
This file contains basic input/output code
use "core/metaprogramming"
use "core/operators"
use "core/control_flow"
public:
### Text is written with $(WRITE OUTPUT) and read with $(READ INPUT), which the program
running Nomsu can choose (by default, they use stdout and stdin)
(say (*extra arguments*)) means:
$line = ""
for $ in (1 to (select "#" (*extra arguments*))):
$arg = (select $ (*extra arguments*))
$line = "\$line\($arg as text)"
WRITE OUTPUT "\$line\n"
(say $message inline) means (WRITE OUTPUT $message)
(ask $prompt) means:
WRITE OUTPUT $prompt
return (READ INPUT)
|