2013-07-02 2 views
3

정수 기호로 된 DataValue %를 함수로 전달한다는 것은 무엇을 의미합니까? "%"없이 그냥 통과하는 것과 어떻게 다른가요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 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 

답변

5

는, 데이터 유형, % 의미 정수를 지정하는 매우 "Visual Basic의"방법입니다.

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

상세 정보 :http://support.microsoft.com/default.aspx?scid=kb;en-us;191713

+1

는''입니다 @'Currency' – Bob77

+4

내가 그 운영이 얼마나 악을 충분히 강조 할 수 는 여기에 몇 가지 다른 유형입니다. 명확하게 명명 된 형변환 함수를 사용하십시오. – UnhandledExcepSean