Skip to content

ReadLine

Narta Xaymar Dirks edited this page Oct 28, 2026 · 5 revisions

Blitz3DBlitzPlusBlitzBasic

ReadLine

ReadLine:String stream:Int32
Parameter Mode Type Default Description
stream In 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



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally