82
Language Reference
©2000-2008 Tibbo Technology Inc.
dimension in an array. Please, examine the examples below.
Examples
dim
x, y(5)
as
integer
' x is an integer; y is a one-dimensional array of
5 integers.
dim
z(2, 3)
as
byte
' a two-dimensional array, 2x3 bytes.
dim
z2(2)
as
byte
(3)
' same -- a two-dimensional array, 2x3 bytes
dim
z2
as
byte
(2,3)
' same again -- a two-dimensional array, 2x3 bytes
dim
s
as
string
(32)
' s is a string which can contain up to 32 bytes
dim
s(10)
as
string
(32)
'array of 10 strings with 32-byte capacity
dim
s
as
string
(32)(10)
'alternative way to make the same definition
Doevents Statement
Function:
Interrupts the current event handler and processes all
events in the queue at the moment of invocation.
Syntax:
doevents
Scope:
Global, HTML and local
See Also:
Details
Executes events pending in the queue, then returns execution to current event
handler. See
above.
Examples
'calculate sum of all array elements -- this will surely take time!
dim
sum, f
as
word
sum =
0
for
f =
0
to
49999
sum = sum + arr(f)
doevents
'don't want to stall other events so allow their execution
while we are crunching numbers
next
f
Do... Loop Statement
Function:
Repeats a block of statements while a condition is True
or until a condition becomes True.
79
68