Table of contents
TOC
折叠目录
展开目录

Microsoft Forms 中的 ByVal 引用ByVal References in Microsoft Forms

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

Microsoft Forms 中的 ByVal 关键字指示参数作为值传递;这是 Visual Basic 中 ByVal 的标准含义。但在 Microsoft Forms 中,可将 ByVal 用于 ReturnBoolean、ReturnEffect、ReturnInteger 或 ReturnString 对象。如果这样做,传递的值不是简单的数据类型;而是指向对象的指针。The ByVal keyword in Microsoft Forms indicates that an argument is passed as a value; this is the standard meaning of ByVal in Visual Basic. However, in Microsoft Forms, you can use ByVal with a ReturnBoolean, ReturnEffect, ReturnInteger, or ReturnString object. When you do, the value passed is not a simple data type; it is a pointer to the object.

使用这些对象,ByVal 指的对象,不传递参数的方法。每个上面列出的对象有可以设置Value属性。此外可以将该值传递函数的进出。因为您可以更改该对象的成员的值,即使该事件语法说明该参数是 ByVal 事件会产生与 ByRef 一致的结果。When used with these objects, ByVal refers to the object, not the method of passing parameters. Each of the objects listed above has a Value property that you can set. You can also pass that value into and out of a function. Because you can change the values of the object's members, events produce results consistent with ByRef behavior, even though the event syntax says the parameter is ByVal.

将一个值分配给参数与 ReturnBoolean、 ReturnEffect、 ReturnInteger,或 ReturnString 是与任何其他参数的值设置没有什么不同。例如,如果事件语法表明与 ReturnBoolean 对象使用_Cancel_参数,语句是仍然有效,这一点与其他数据类型一样。Assigning a value to an argument associated with a ReturnBoolean, ReturnEffect, ReturnInteger, or ReturnString is no different from setting the value of any other argument. For example, if the event syntax indicates a Cancel argument used with the ReturnBoolean object, the statement is still valid, just as it is with other data types.

© 2018 Microsoft