PROTECT is used to set LIF file passwords under HP BASIC and file attributes under HTBasic.
A special form of PROTECT is used by HTBasic to change file attributes. The syntax is:
PROTECT file-specifier, protect-code
where protect-code is a string containing zero or more of the following characters:
Character
|
Meaning
|
(none)
|
no protection
|
R
|
Read-only: File cannot be written or deleted.
|
S
|
System file: This attribute usually has no meaning.
|
H
|
Hidden: File will not be listed by CAT.
|
If a character is not included, that attribute is cleared. If the string is blank, all attributes are cleared. For example:
PROTECT "FILE1","R"