>>> Continued from previous message
'
SUB RunTheSelectCaseDemo ()
DIM One AS INTEGER
DIM Two AS STRING
DIM Three AS OurType
DIM i AS INTEGER, x AS INTEGER
FOR i = 1 TO 1000
FOR x = 1 TO 8
' The appropriate SUB is called by means of a SELECT CASE
' statement....
' NB: I don't normally format my code like the following....
' I just did it here to conserve space....
SELECT CASE x
CASE 1 : A one, two, three
CASE 2 : B one, two, three
CASE 3 : C one, two, three
CASE 4 : D one, two, three
CASE 5 : E one, two, three
CASE 6 : F one, two, three
CASE 7 : G one, two, three
CASE 8 : H one, two, three
END SELECT
NEXT x
NEXT i
END SUB
SUB RunTheCodePtrDemo ()
DIM one AS INTEGER
DIM two AS STRING
DIM three AS OurType
DIM i AS INTEGER, x AS INTEGER
FOR i = 1 TO 1000
FOR x = 1 TO 8
' The appropriate SUB is called by means of a code pointer,
' and the parameters are passed accordingly, using the newly
' introduced BDECL format....
CALL DWORD CodePtrTable(x) BDECL (one, two, three)
NEXT x
NEXT i
END SUB
' The SUB's follow....
' For this demo, they are just empty wrappers, but you get
' the idea.
SUB A (One AS INTEGER, Two AS STRING, Three AS OurType)
END SUB
SUB B (One AS INTEGER, Two AS STRING, Three AS OurType)
END SUB
SUB C (One AS INTEGER, Two AS STRING, Three AS OurType)
END SUB
SUB D (One AS INTEGER, Two AS STRING, Three AS OurType)
END SUB
SUB E (One AS INTEGER, Two AS STRING, Three AS OurType)
END SUB
SUB F (One AS INTEGER, Two AS STRING, Three AS OurType)
END SUB
SUB G (One AS INTEGER, Two AS STRING, Three AS OurType)
END SUB
SUB H (One AS INTEGER, Two AS STRING, Three AS OurType)
END SUB
* OLX 2.1 TD * Ask me about finite state automata
--- Maximus/2 2.01wb
---------------
* Origin: Sound Stage BBS - Live Via Satellite - (604)944-6476 (1:153/7070)
|