KScript docs
EN

Getting started

Asking for input

KScript.Terminal reads from the keyboard. In the docs, click Input and type the answers, one per line, before you run.

<import package="KScript.Terminal" />

<input into="name" default="'stranger'">What's your name? </input>
<echo>Hello, { $name }!</echo>
import KScript.Terminal

input(into: name, default: 'stranger') "What's your name? "
echo "Hello, { $name }!"

Edit this page on GitHub