本文介绍了VB6 变量声明中的星号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
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
解决方案
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?
这篇关于VB6 变量声明中的星号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!