89
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
dim
arr1(
5
),arr2(
5
),f
as
byte
sub
on_sys_init
arr1(
0
) =
1
arr1(
1
) =
2
arr1(
2
) =
3
arr1(
3
) =
4
arr1(
4
) =
5
arr2(
0
) =
1
arr2(
1
) =
2
arr2(
2
) =
2
arr2(
3
) =
4
arr2(
4
) =
5
'compare arrays and jump if not exactly the same
for
f=
0
to
4
if
arr1(f)<>arr2(f)
then
goto
not_the_same
next
f
'here when both arrays contain the same data
exit
sub
'here when arrays are not the same
not_the_same:
'... place code here ...
If.... Then... Else Statement
Function:
A way to conditionally execute code.
Syntax:
if expression then
statement1
statement2
…
[ else
statement1
statement2
…
]
end if
or:
if expression then true_statement1 : true_statement2 …
Scope:
Local and HTML
See Also:
Part
Description
expression
Required. The result of this expression (true or false) is
then used to determine what code will execute.
statement[1,
2...]
Required. Statements to execute.
91