Skip to content

WriteString

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

Blitz3DBlitzPlusBlitzBasic

WriteString

WriteString:Void stream:Int32, string:String
Parameter Mode Type Default Description
stream In Int32 required The stream to write to.
string In String required The text to write.

Description

Writes a string as its length in 4 bytes followed by its text, without a line ending. Read it back with ReadString.

Examples

file = WriteFile("streams_string_example.tmp")
WriteString file, "Hello"
CloseFile file
Print FileSize("streams_string_example.tmp")
file = ReadFile("streams_string_example.tmp")
Print ReadString$(file)
CloseFile file
DeleteFile "streams_string_example.tmp"
9
Hello

Related Commands

ReadString, WriteByte, WriteFloat, WriteInt, WriteLine, WriteShort

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally