?? modlinear.bas
字號:
Attribute VB_Name = "modLinear"
' Code module modLinear.bas
Option Explicit
Function LinearSearch(a() As Integer, key As Integer) As Integer
Dim x As Integer
For x = LBound(a) To UBound(a)
If a(x) = key Then
LinearSearch = x ' Return index
Exit Function
End If
Next x
LinearSearch = -1 ' Value not found
End Function
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -