WriteData()

Syntax

WriteData(#File, *MemoryBuffer, Length)
Description
Write the content of the specified memory buffer to the #File. 'Length' is the memory size (in bytes) to be written.

Example:


  *MemoryID = AllocateMemory(1000)       ; allocating a memory block
  If *MemoryID
    PokeS(*MemoryID, "Store this string in the memory area")   ; we write a string into the memory block
  EndIf
  If CreateFile(0, "Text.txt")           ; we create a new text file...
    WriteData(0, *MemoryID, 10)          ; write the first 10 chars from the memory block into the file
    CloseFile(0)                         ; close the previously opened file and so store the written data
  Else
    Debug "may not create the file!"
  EndIf

Supported OS

All

<- WriteCharacter() - File Index - WriteDouble() ->