VBS TUTORIAL: VBSCRIPT statement-property let statement _vbs

Source: Internet
Author: User

Property Let statement

In the Class block, declare names, parameters, and code, which form the body of the property procedure for the assignment (set).

 [Public | Private] Property Let name (
 
[arglist,] value

)

[statement]
    [Exit Property]
    [statement]
End Property

Parameters

Public

Indicates that the property Let procedure can be accessed by all other procedures in all scripts.

Private

Indicates that the property Let procedure can only be accessed by other procedures within the Class block that is defined.

Name

The name of the Property Let procedure, the standard variable naming rule, except that its name can be associated with a Property Get or property Set in the same Class block process is the same.

ArgList

The list of variables represents the parameters that are passed to the Property Let procedure at the time of the call. Multiple parameters are separated by commas. The name of each parameter of the Property Let procedure must be the same as the corresponding parameter in the Property Get procedure. In addition , the Property Let process has more arguments than the corresponding Property Get procedure. The parameter is the value assigned to the property.

Value

The variable contains the value you want to assign to the property. When a procedure is invoked, the argument appears to the right of the invocation expression.

Statement

Any set of statements that will be executed within the body of the Property Let procedure.

Note that each Property Let statement must define at least one parameter for the defined attribute. The parameter (the last argument when multiple arguments exist) contains the value to assign to the property when it is invoked. This parameter is called valuein the previous syntax.

Description

If you do not explicitly use public or private to specify , the Property Let procedure is set to common by default, that is, they are visible to all other processes within the script. The values of local variables in the property Let process are not saved between different procedure invocations.

The Property Let procedure cannot be defined within any other process, such as a Function or property get.

The Exit Property statement causes an immediate exit from the Property Let procedure. The program will continue to execute from the point following the statement that called the Property Let procedure. The Exit Property statement can appear anywhere in the property let process, not limited to the number of times.

Like the Function and Property Get procedures, The Property Let procedure is a separate process that accepts parameters, executes a series of statements, and changes the value of the parameter. However, unlike the Function and Property Get procedures, they both return a value, and the Property Let procedure can only be used to the left of the attribute assignment expression.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.