
7-6
Section
Details of BASIC Commands
211
pword
Syntax:
PWORD
<string expression>
Description:
Statement. Assigns a password to the BASIC program area.
Remarks:
<string expression> is any valid BASIC string with a maximum length of 32 characters. If the
name is longer than 32 characters it will be truncated. Passwords are case-sensitive.
The
PWORD
statement must be the first line of the BASIC program. The password will be invalid if
the
PWORD
statement is not at the beginning of the program.
Set the password after inputting the whole program. If the password is set at the beginning of the
program, the password will be required at the beginning.
If a BASIC program is protected with a
PWORD
statement then the password will be requested for
the following commands. If the password is incorrect then a “PASSWORD INCORRECT” error
(code 0069) will occur. If the password is correct then the command will be executed as normal.
Even if a password is set using the
PWORD
statement, the program will not be protected from the
NEW
command.
Examples:
> 1 PWORD “ABRACADABRA”
> 20 PRINT “PROTECTED BY A PASSWORD”
> RUN
> PROTECTED BY A PASSWORD
> LIST
PASSWORD : ***********
1 PWORD “ABRACADABRA”
20 PRINT “PROTECTED BY A PASSWORD”
>
See also:
PNAME
,
PMEM
random
Syntax:
RANDOM
[<seed>]
Description:
Statement. Re-seeds the random number generator.
Remarks:
<seed> is a numerical expression that is used as the random number generator seed. The valid
range is: [-32768…32767].
If the
RANDOM
statement is used without a seed then the user will be prompted for it.
If the random number generator is not re-seeded then the
RND
statement will begin the same
pseudo-random sequence each time the power is turned OFF. For better random behavior the
random number generator should be re-seeded using the
RANDOM
statement each time a program is
executed.
Examples:
> 10 RANDOM 654
> 20 PRINT RND
> RUN
.234831
> PRINT RND
.969226
> RUN
.234831
See also:
RND
Содержание C200H-ASC11
Страница 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Страница 2: ...iv...
Страница 4: ...vi...