VB6函数名中&符号的意义?
我刚刚收到一堆遗留的 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这意味着该函数返回一个 Long(即 32 位整数)值。
它相当于
后缀的完整列表如下:
It means that the function returns a Long (i.e. 32-bit integer) value.
It is equivalent to
The full list of suffixes is as follows:
正如 Philip Sheard 所说,它是 Long 的标识符类型。它们仍然存在于 .Net 中,请参阅此 MSDN链接和这篇VB6文章
来自第二篇文章:
As Philip Sheard has said it is an indentifier type for a Long. They are still present in .Net, see this MSDN link and this VB6 article
From the second article: