Skip to content

ReadLine

Narta Xaymar Dirks edited this page Nov 25, 2026 · 7 revisions

ReadLine BlitzBasic

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 BlitzBasic, ReadByte BlitzBasic, ReadFloat BlitzBasic, ReadInt BlitzBasic, ReadShort BlitzBasic, ReadString BlitzBasic, WriteLine BlitzBasic

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally