Skip to content

ReadLine

Claude edited this page Oct 27, 2026 · 7 revisions

Blitz3DBlitzPlusBlitzBasic

ReadLine

ReadLine:String stream:Int32
Parameter Type Default Description
stream Int32 required The stream to read from.

Returns: The text of the line.

Description

Reads text up to the end of the line. Lines may end with a line feed or with a carriage return and a line feed, and a last line without an ending is read as well. The line ending is not part of the result.

Examples

file = WriteFile("streams_line_example.tmp")
WriteByte file, Asc("a")
WriteByte file, 10
WriteByte file, Asc("b")
WriteByte file, 13
WriteByte file, 10
WriteByte file, Asc("c")
CloseFile file
file = ReadFile("streams_line_example.tmp")
Print ReadLine$(file)
Print ReadLine$(file)
Print ReadLine$(file)
CloseFile file
DeleteFile "streams_line_example.tmp"
a
b
c

Related Commands

ReadAvail, ReadByte, ReadFloat, ReadInt, ReadShort, ReadString, WriteLine

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally