96
Language Reference
©2000-2008 Tibbo Technology Inc.
Part
Description
expression
Required. The expression which is to be evaluated.
statement[1,
2...]
Required. The code to run when the expression is true.
Details
Makes a pre-conditional loop. First, the expression is evaluated and then if it is
true statement1, statement2, etc are executed. Then expression is evaluated
again and so on until expression becomes false.
Examples
function
wait_char(ch
as
byte
)
as
byte
' waits for specific character with ASCII code ch to arrive into the
serial port.
' returns 0 if char was encountered or 1 if this character was encountered
dim
s
as
string
(
1
)
' input data byte by byte for as long as there is some data left to
process
s = ser.getdata(
255
)
' will input byte by byte as s only can contain
a single char!
while
len(s)<>
0
if
s = chr(ch)
then
wait_char =
0
' character encountered!
exit
function
end
if
s = ser.getdata(
255
)
wend
wait_char =
1
' did not encounter ch character and there is no more
data to input (for now)!
End
Function
Keywords
This chapter contains links from single keywords to the statements in which you
may find them. It is meant to be used as a resource for context-sensitive help.
As
A keyword designating data type. Appears as part of the following statements:
79
81
87
93