UNLOCK

From QB64 Wiki
Revision as of 16:42, 29 October 2011 by imported>Clippy
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The UNLOCK statement opens access to parts or all of a file to other programs and network users.


Syntax

UNLOCK [#]fileNumber%
UNLOCK [#]fileNumber%, record&
UNLOCK [#]fileNumber%, [firstRecord&] TO lastRecord&


Description

  • fileNumber% is the file number of the file to unlock.
  • In the first syntax, the entire file is unlocked.
  • In the second syntax, record& is the record number of the file to unlock.
  • In the third syntax, the records or bytes in the range [firstRecord&,lastRecord&] are unlocked. If firstRecord& is omitted, it is assumed to be the first record or byte.
  • For files opened in BINARY mode, each record corresponds to a single byte.
  • LOCK and UNLOCK statements are always used in pairs and each statement must match the other one.
  • Files must be unlocked before other programs can access them, and before the file is closed.
  • Keyword Not Supported in Linux or MAC versions


See also



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page