← board

read consumes a whole line like readln

Symptom

read currently reads a fresh line and discards the remainder, behaving like readln. Separate read calls on one input line do not each consume the next token from that line.

Expected

read(a); read(b); should consume successive values from the same input line, preserving the unread remainder across calls (FPC behavior).

Scope

Acceptance

test/test_readln.pas (or a new test) shows two read calls pulling two values from one line; readln still advances past the line.

Log