VBA语言规范之变量生命周期类型(Extent Name - VBA Language Specification)

变量生命周期即变量在内存中与数据值绑定的时间跨度。

变量生命周期类型
Extent Name

变量声明方式
Variable Definition Form

变量生命周期
 
Variable Lifespan

Program Extent

Defined by the VBA specification or by the host application.

The entire existence of an active VBA Environment.

Module Extent

A Module Variable Declaration or a static local variable declaration within a procedure.

The span from the point that the containing module is incorporated into an active VBA project to the point when the module or project is explicitly or implicitly removed from its VBA Environment.

Procedure Extent

A procedure local variable or formal parameter declaration of a procedure.

The duration of a particular procedure invocation.

Object Extent

A variable declaration within a class module.

The lifespan of the containing object.

Aggregate Extent

A dependent variable (section 2.3.1) of an array or UDT variable.

The lifespan of the variable holding the containing aggregate data value (section 2.1.1).



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值