Welcome to the Dictionary of Programming Languages, a compendium
of computer coding methods assembled to provide information and
aid your appreciation for computer science history.
Browse the dictionary by clicking on a section:
A
B
C
D
E
F
G
H
I
JK
L
M
N
O
P
QR
S
T
UV
WXYZ+
Get a full dump of the dictionary:
List of Names
Short Form
Full Form
'* Locates Find$ in sorted array Array$ () and returns element number or -1 *
'* by Matt Usner.
FUNCTION BinarySearch% (Array$(), Find$)
BinarySearch% = -1 ' no matching element yet
Min = LBOUND(Array$) ' start at first element
Max = UBOUND(Array$) ' consider through last
DO
Try = (Max + Min) \ 2 ' start testing in middle
IF Array$(Try) = Find$ THEN
BinarySearch% = Try ' return matching element
EXIT DO
END IF
IF Array$(Try) > Find$ THEN ' too high, cut in half
Max = Try - 1
ELSE
Min = Try + 1 ' too low, cut other way
END IF
LOOP WHILE Max >= Min
END FUNCTION
Descriptions in this dictionary are ©1997-99 Neal Ziring. Some examples copyright of their respective authors. Some technologies and languages are trademarked. Permission to copy descriptions is granted as long as authorship credit is preserved.
Comments on this dictionary, corrections and suggestions, are all welcome. Please use email, the address is ziring@home.com
[Ziring MicroWeb Home] [Dictionary Start] [Sign Guestbook]
Dictionary and script maintained by Neal Ziring, last major modifications 3/18/98. Most recent additions to dictionary and master list, 1/00.