Reference · Files and processes

read_line

signature
read_line() -> str | null | error(str)

What it does

The next line a script is given, without its line break, or null at the end of what is piped in. A loop of read_line() reads a file of any size a line at a time.

Examples

in a program
// quillo run upper.qwe < notes.txtlet line = read_line()while line != null {    print(upper(line))    line = read_line()}

Edge cases

Errors

As stdin, it is for a script: in a program that serves it is a runtime error.

Chaining

None: it takes nothing.

See also

stdin, exit, args

Thread
5Useful? Like it, or add to its thread below.

Thread 0 posts

On read_line(): questions, tips, corrections, and code that uses it.

No posts yet. The first one opens the thread.

    Edit this page on GitHub · every example's output was made by running it (tools/refcheck.mjs) · questions on Discord or r/quillo