Реферат: Networking Principles Essay Research Paper DialUp Scripting

endproc

A script must have a main procedure, specified by the proc keyword, and a matching endproc keyword, indicating the end of the procedure.

You must declare variables before you add commands. The first command in the main procedure is executed, and then any subsequent commands are executed in the order they appear in the script. The script ends when the end of the main procedure is reached.

3.0 Variables

Scripts may contain variables. Variable names must begin with a letter or an underscore (’_'), and may contain any sequence of upper- or lower-case letters, digits, and underscores. You cannot use a reserved word as a variable name. For more information, see the list of reserved words at the end of this document.

You must declare variables before you use them. When you declare a variable, you must also define its type. A variable of a certain type may only contain values of that same type. The following three types of variables are supported:

Type Description

integer A negative or positive number, such as 7, -12, or 5698.

string A series of characters enclosed in double-quotes; for example, “Hello world!” or “Enter password:”.

boolean A logical boolean value of TRUE or FALSE.

Variables are assigned values using the following assignment statement:

variable = expression

The variable gets the evaluated expression.

Examples:

integer count = 5

integer timeout = (4 * 3)

integer i

boolean bDone = FALSE

string szIP = (getip 2)

set ipaddr szIP

3.1 System Variables

System variables are set by scripting commands or are determined by the information your enter when you set up a Dial-Up Networking connection. System variables are read-only, which means they cannot be changed within the script. The system variables are:

Name Type Description

$USERID String The user identification for the current connection. This variable is

the value of the user name specified in the Dial-Up Networking

Connect To dialog box.

$PASSWORD String The password for the current connection. This variable is the

value of the user name specified in the Dial-Up Networking

Connect To dialog box.

К-во Просмотров: 207
Бесплатно скачать Реферат: Networking Principles Essay Research Paper DialUp Scripting