Hi, Zack:
ZJ> Select Case CRate
ZJ> Case "300 b"
ZJ> incr bbs(0)
ZJ> Case "1200"
ZJ> incr bbs(1)
[....]
ZJ> Case "28800"
ZJ> incr bbs(13)
ZJ> End Select
Right away I can tell you that using SELECT CASE will not give you the
best results as concerns speed, since the code skips over each entry in
the list until it makes a hit.... At the very least, put the most
common speeds on top, the least (300) on the bottom of the list.
Consider this code:
DEFINT A-Z
CLS
MTIMER
FOR x = 1 TO 1000
FOR i = 1 TO 4
SELECT CASE i
CASE 1
CASE 2
CASE 3
CASE 4
END SELECT
NEXT
NEXT i
PRINT MTIMER
MTIMER
FOR x = 1 TO 1000
FOR i = 1 TO 4
ON i GOSUB 1, 2, 3, 4
NEXT
NEXT i
PRINT MTIMER
END
1:
RETURN
2:
RETURN
3:
RETURN
4:
RETURN
Jamshid
--- Maximus/2 2.01wb
---------------
* Origin: Sound Stage BBS - Live Via Satellite - (604)944-6476 (1:153/7070)
|