Skip to content
Paul Squires edited this page Oct 19, 2026 · 2 revisions

Home › File I/O Functions › Unlock

Unlock

Removes a restriction that Lock put on a record or byte range.

Syntax

Unlock #filenum, record
Unlock #filenum, start To end

Parameters

  • filenum
  • record
  • start
  • end

Description

Unlock removes the temporary access restriction set by Lock.

It is strongly recommended to use the same arguments used in the previous Lock.

Note: This command does not always work, neither as documented nor as expected. It appears to be broken at the moment.

Remarks

Differences from QB

  • Currently, FB cannot implicitly unlock the entire file
  • In Random mode, FB cannot unlock a range of records

See also

Examples

For an example see Lock.


Category: File I/O Functions
Kind: keyword


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally