?? module1.bas
字號:
Attribute VB_Name = "Module1"
Function fun(ByVal a As Double, ByVal i As Integer, ByVal flag As Integer)
s = Str(a)
pos = InStr(1, s, ".", vbBinaryCompare)
If pos = 0 And flag = 1 Then
s = s + "." + Str(i)
a = Val(s)
End If
If pos = 0 And flag = 0 Then
a = a * 10 + i
End If
If pos <> 0 Then
s = s + Str(i)
a = Val(s)
End If
fun = a
End Function
Function comput(ByVal a As Double, ByVal b As Double, index As Integer)
Select Case index
Case 0: result = a / b
Case 1: result = a * b
Case 2: result = a - b
Case 3: result = a + b
Case 4: result = a Mod b
End Select
comput = result
End Function
Function convert(ByVal a As Double)
s = Str(a)
pos = InStr(1, s, "E", vbBinaryCompare)
If a > -1 And a < 1 And a <> 0 And pos = 0 Then
s = "0" + s
End If
pos = InStr(1, s, ".", vbBinaryCompare)
If pos = 0 Then
s = s + "."
End If
convert = s
End Function
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -