Instructions
346Libraries
© 2013 Conrad Electronic
Sub SPI_WriteBuf(ByRef buf As Byte, length As Word)
Description
A number of bytes are sent to the SPI interface. The function works with 8 bits, regardless of whether the
SPI interface is initialized with more bits.
Parameter
buf pointer to byte array
length number of bytes to be transferred
5.24 Strings
One part of these string routines is implemented in the Interpreter, another can be called up after ap-
pending library "String_Lib.cc". Since the functions in "String_Lib.cc" are realized through Bytecode
they are slower when executed. Library functions however have the advantage that they can be taken
from the project by omitting the library in case they are not needed. Direct Interpreter functions are
always present, will however take up flash memory.
There is no explicit "String" data type. A string is based on a character array. The size of the array
must be chosen in such a way that all characters of the string fit into the character array. Addition-
ally some space is needed for a terminating character (decimal Zero) in order to indicate the end of
the character string.
5.24.1 Str_Comp
String Functions
Syntax
char Str_Comp(char str1[], char str2[]);
Sub Str_Comp(ByRef str1 As Char, ByRef str2 As Char) As Char
Description
Two strings are compared.
Parameter
str1 pointer to char array 1
str2 pointer to char array 2
Return Parameter
0 both strings are equal
<0 if the first string is smaller than the second
>0 if the first string is greater than the second