← board

Default Text file surface and file-handle IO dispatch

Problem

The RTL can now provide a PAL-backed Text record and library procedures, but FPC-style source expects the text-file surface to be available without an explicit uses textfile, and ReadLn/WriteLn are lexer keywords. Calls like these are either unresolved (Assign) or intercepted by the compiler before ordinary procedure resolution:

WriteLn(f, 'room=' + Player.RoomId);
ReadLn(f, line);

Today examples/adventure still stops at Assign being undefined. Once the surface is visible, the builtin console lowering will also need to recognize a file-handle first argument instead of treating all arguments as console values.

Scope

Acceptance

Log

Resolved-in: 0fe2e9c (finalizing commit)