ask

Built-ins

Canonical ID: input.readLine. Nederlands: vraag.

Asks the host for one text reply and waits cooperatively. The reply remains Text even if it looks like a number. Answers are bounded to 64 KiB of valid UTF-8. A missing or unusable input host produces a structured input diagnostic. This is a learner prompt, not raw terminal, keyboard-device, or file access.

Signature

ask(prompt)

Arguments

Parameter Type Requirement
prompt Text Question displayed by the host.

Return value

Text.

Example

# language: en
let name = ask("Name?")
say "Pliro", name

Enter a name; it is printed after Pliro.

Notes and common mistakes

Use the function name for your source language. Its canonical ID is a shared documentation label; you do not type that ID as a call. Giving your own variable or function the same name can hide the built-in. Supply the documented arguments and value types. Pliro reports mismatches when checking can detect them, or when the call runs.

The selected host mediates input. Program replies are bounded to 64 KiB of valid UTF-8; unavailable input produces E4010. Keyboard names and option strings are data and are not translated with source syntax. Completed prompts are cooperative checkpoints.

askNumber · askYesNo · choose · keyDown · Programming guides · Host support · Calls and arguments