mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-26 09:45:54 +00:00
Added new _STRCMP and _STRICMP commands for quick string comparisons. Cleaned up QB64 to finish removing the QUI (quick user insert) code and folders. Altered UCASE and LCASE routines to be faster in some situations for us.
28 lines
1.4 KiB
Plaintext
28 lines
1.4 KiB
Plaintext
The {{KW|LOCK}} statement restricts access to parts of a file by other programs or processes.
|
|
|
|
|
|
{{PageSyntax}}
|
|
:{{KW|LOCK}} [#]{{Parameter|fileNumber%}}
|
|
:{{KW|LOCK}} [#]{{Parameter|fileNumber%}}, {{Parameter|record&}}
|
|
:{{KW|LOCK}} [#]{{Parameter|fileNumber%}}, [{{Parameter|firstRecord&}}] TO {{Parameter|lastRecord&}}
|
|
|
|
|
|
{{PageDescription}}
|
|
* {{Parameter|fileNumber%}} is the file number of the file to lock.
|
|
* In the first syntax, the entire file is locked.
|
|
* In the second syntax, {{Parameter|record&}} is the record number of the file to lock.
|
|
* In the third syntax, the records or bytes in the range [{{Parameter|firstRecord&}},{{Parameter|lastRecord&}}] are locked. If {{Parameter|firstRecord&}} is omitted, it is assumed to be one (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 using [[UNLOCK]] before other programs can access them, and before the file is closed.
|
|
* Requires DOS '''SHARED.EXE''' be run for QBasic to use networking access modes.
|
|
* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword Not Supported in Linux or MAC versions]]
|
|
|
|
|
|
{{PageSeeAlso}}
|
|
* {{KW|UNLOCK}}
|
|
* {{KW|OPEN}}
|
|
* {{KW|ACCESS}}
|
|
|
|
|
|
{{PageNavigation}} |