CloseFile

Family: File · One form

What it does

CloseFile makes something happen at once: it closes. It takes iFileID (an integer), and returns nothing. iFileID is the id of a File object, obtained elsewhere in the File family.

Syntax

CloseFile(iFileID integer)

Parameters

NameType
iFileIDinteger

Every form returns

nothing

Example · generated

file = CreateMemblockFromFile("assets/data.dat")CloseFile(file)DO  Sync()LOOP

CreateMemblockFromFile is there to give the call something to act on; CloseFile is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

Related commands

61 commands in File