VB6 函数名称中与号的意义? [英] Significance of an ampersand in VB6 function name?
问题描述
我刚刚收到了一堆遗留的 VB6 (!) 代码,我一直看到在名称末尾使用与号声明的函数,例如,Private Declare Function ShellExecute&...
.
I just got a bunch of legacy VB6 (!) code dumped on me and I keep seeing functions declared with an ampersand at the end of the name, for example, Private Declare Function ShellExecute& . . .
.
我一直无法找到有关其重要性的答案,也无法检测到使用中的任何模式或如此命名的函数的签名.
I've been unable to find an answer to the significance of this, nor have I been able to detect any pattern in use or signature of the functions that have been named thusly.
有人知道那些尾随与号对编译器是否意味着什么,或者至少是否有一些我遗漏的约定?到目前为止,我作为一个奇怪的程序员写下它,但我想确定它背后是否有任何意义.
Anyone know if those trailing ampersands mean anything to the compiler, or at least if there's some convention that I'm missing? So far, I'm writing it off as a strange programmer, but I'd like to know for sure if there's any meaning behind it.
推荐答案
表示函数返回一个 Long(即 32 位整数)值.
It means that the function returns a Long (i.e. 32-bit integer) value.
相当于
Declare Function ShellExecute(...) As Long
完整的后缀列表如下:
Integer %
Long &
Single !
Double #
Currency @
String $
这篇关于VB6 函数名称中与号的意义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!