vb6函数调用中的百分比和符号

vb6函数调用中的百分比和符号,vb6,Vb6,将带有%符号的整型数据值%传递到函数中意味着什么?这与没有“%”的情况下直接进入有什么不同 另外,传入PortNum%vs PortNum意味着什么 Private Sub WritePortValue(ByVal DataValue As Integer) ' write the value to the output port ' Parameters: ' BoardNum :the number used by CB.CFG to describe th

将带有%符号的整型数据值%传递到函数中意味着什么?这与没有“%”的情况下直接进入有什么不同

另外,传入PortNum%vs PortNum意味着什么

Private Sub WritePortValue(ByVal DataValue As Integer)

   ' write the value to the output port
   '  Parameters:
   '    BoardNum    :the number used by CB.CFG to describe this board
   '    PortNum&    :the output port
   '    DataValue%  :the value written to the port

   ULStat& = cbDOut(BoardNum, PortNum&, DataValue%)

   If ULStat& <> 0 Then
      Stop
   Else
      lblShowValOut.Caption = Format$(DataValue%, "0")
   End If

End Sub
私有子WritePortValue(ByVal数据值为整数)
'将值写入输出端口
“参数:
'BoardNum:CB.CFG用于描述此板的数字
'PortNum&:输出端口
'DataValue%:写入端口的值
ULStat&=cbDOut(BoardNum、PortNum&、DataValue%)
如果ULStat&0,则
停止
其他的
lblShowValOut.Caption=格式$(数据值%,“0”)
如果结束
端接头

当您使用
%
时,它是一种非常“Visual Basic”的方法来指定数据类型,
%
表示整数。 以下是一些其他类型:

% : Integer
& : Long
# : Double
! : Single
@ : Currency
$ : String

更多信息:

我怎么强调都不过分,那些操作员是多么邪恶。使用命名明确的强制转换函数。