载入中...
时 间 记 忆
载入中...
最 新 评 论
载入中...
专 题 分 类
载入中...
最 新 日 志
载入中...
最 新 留 言
载入中...
搜 索
用 户 登 录
载入中...
友 情 连 接
博 客 信 息
载入中...


Copyright xzj
 
VB带返回值的函数
[ 2009-6-13 3:04:00 | By: 110xia ]
 

'函数Command1_Click(), 调用函数Max()
'函数Max()返回最大值
Private Sub Command1_Click()
    Dim aa As Integer
    Dim bb As Integer
    aa = Text1.Text
    bb = Text2.Text
    MsgBox Max(aa, bb)
End Sub

Max(a As Integer, b As Integer) As Integer
    If a > b Then
       Max = a
    Else
       Max = b
    End If
End

 

 
 
  • 标签:VB 返回值 函数 
  • 发表评论:
    载入中...
    QQ 156534403