1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-03 15:51:20 +00:00
QB64-PE/internal/help/CLOSE.txt

29 lines
1 KiB
Plaintext

{{KW|CLOSE}} closes an opened file or port using the number(s) assigned in an {{KW|OPEN}} statement.
{{PageSyntax}}
::: '''CLOSE''' [''filenumber''[, ...]]
''[[Parameters]]:''
* ''filenumber'' indicates the file or list of file numbers to close. When not designated all files are closed.
''Usage:''
* A file MUST be closed when changing to another file mode.
* CLOSE files when they are no longer needed to save memory.
* Files cannot be opened in the same [[OPEN]] mode using another number until the first one is closed.
* Use holding variables for each file number returned by [[FREEFILE]] so that the file reference is known.
* Will not return an error if a filenumber is already closed or was never opened. It does not verify that a file was closed.
* [[CLEAR]] will also close all open files.
* CLOSE can also be used to close an open TCP/IP connection using a handle returned by '''QB64'''.
{{PageSeeAlso}}
* [[OPEN]], [[OPEN COM]]
* [[_OPENCLIENT]], [[_OPENHOST]]
* [[_OPENCONNECTION]]
* [[_SNDCLOSE]]
{{PageNavigation}}