VB6 变量声明中的星号
变量声明后的星号 (*) 和数字的含义是什么?如WpName As String * 6
中所示
Public Type WayPoint
WpIndex As Integer
WpName As String * 6
WpLat As Double
WpLon As Double
WpLatDir As String * 1
WpLonDir As String * 1
End Type
What's the meaning of the asterisk (*) and the number, after the variable declaration? As seen in WpName As String * 6
Public Type WayPoint
WpIndex As Integer
WpName As String * 6
WpLat As Double
WpLon As Double
WpLatDir As String * 1
WpLonDir As String * 1
End Type
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
星号将变量声明为固定长度字符串,其中数字表示字符串的长度:
http://www.1sayfa.com/1024/diger/vb/ch07.htm#Heading8
API 调用可能需要它们,请参阅此问题:
VB6 - 在 VB6 中使用固定宽度字符串是否可以获得任何性能优势?
The asterisk declares the variable as a fixed-length string, where the number indicates the length of the string:
http://www.1sayfa.com/1024/diger/vb/ch07.htm#Heading8
They may be required for an API call, see this question:
VB6 - Is there any performance benefit gained by using fixed-width strings in VB6?