80
Installing [email protected]
"9," is a string that Amanda might dial for an outside line. It consists of the DTMF digit 9
followed by the comma for a pause.
A string that has no characters is called the empty string. It often occurs in programming
and is written as
''
or
""
.
If you use one kind of quotation mark within a string, you should use the other kind as the
string’s delimiters: "Amanda's" or 'Do not use " (the double quotation character)'.
Variables
Each variable is the name of a storage location within the computer that can store a string
or a whole number. After you store something in a variable, you can use that variable’s
name instead of typing the string or the number. This is useful because:
•
Amanda’s variables have simple names (no more than four characters) and save
you typing time. (You are less likely to make a mistake typing a short variable
name than a long string.)
•
You can change the contents of the storage location and still use the same variable.
•
Amanda can perform the same set of tokens over and over again with different val-
ues because the tokens use the variables rather than the values. For example, if you
change the telephone number stored as a variable, Amanda dials the new number
without you having to change any tokens.
The Token Programming Language has system, port, and global variables. Each of them
starts with a percent sign (%).
System variables are controlled by Amanda. For example, %D contains the amount of
available disk space, and %C contains the number of the port currently in use.
Port variables are controlled by you. Their names range from %S0 to %S19. Port variables
provide 20 locations in which to store information on a per-port basis. The %S0 accessed
by Amanda while using one port is not the same location as the %S0 accessed by Amanda
while using another port.
Global variables are also controlled by you. Their names range from %G0 to %G9. These
10 locations are used by all the ports. The %G2 accessed by Amanda while using one port
is exactly the same location as the %G2 accessed by Amanda while using another port.
Assignment
You control port and global variables. For example, you can assign numbers or strings to
them and later change those numbers or strings. For example, you might assign the value
of 65 to %G4 and the value "Amanda" to %S9. Assigning a value to a variable copies that
value to the variable’s storage location.
Initially, each port and global variable has the empty string as its value. Assignment is
done in the Token Programming Language using the assignment command, which starts
with the equal sign (=). When the variable contains a number, you can add to that number
or subtract from it using the command that starts with a plus sign (+).
For example, =(%S1,24) puts the number 24 in the variable named %S1.
+(%S1,15) adds 15 to the 24 in %S1 and then stores the sum 39 in %S1.
+(%S1,-10) subtracts 10 from the 39 in %S1 and then stores the difference 29 in %S1.
Содержание [email protected] Version 3.xx
Страница 1: ...Installing AmAndA Work Place Version 3 xx Installer s Guide Edition 7 01...
Страница 4: ...iv Installing Amanda Work Place...
Страница 60: ...52 Installing Amanda Work Place...
Страница 68: ...60 Installing Amanda Work Place...
Страница 132: ...124 Installing Amanda Work Place...
Страница 150: ...142 Installing Amanda Work Place...
Страница 156: ...148 Installing Amanda Work Place...
Страница 194: ...186 Installing Amanda Work Place...
Страница 206: ...198Installing Amanda Work Place...