Instructions
198Compiler
© 2013 Conrad Electronic
Direct Access to flash Array entries
With version 2.12 it is possible to access single entries in flash arrays:
Flash glob(10) = {1,2,3,4,5,6,7,8,9,10} As Byte
Sub main()
Dim a As Byte
a= glob(2)
End Sub
There is still one limitation: Only references to arrays that lie in RAM can be passed as function
parameters. This is not possible with references to flash arrays.
Strings
There is no explicit "String" data type. A string is based on an array of data type Char. The size of
the array must be chosen in such a way that all characters of the string fit into the character array.
Additionally some space is needed for a terminating character (decimal Zero) inorder to indicate the
end of the character string.
Example for a character string with a 20 character maximum:
Dim str1(21) As Char
As an exception Char arrays may have character strings assigned to. Here the character string is
placed between quotation marks.
str1="hallo world!"
You may embed special characters in strings that are started with a "\" (backslash). The following
sequences are defined:
Sequence
Char/Value
\\
\
\'
'
\a
7
\b
8
\t
9
\n
10
\v
11
\f
12
\r
13
Strings cannot be assigned to multi dimensional Char arrays. There are however tricks for ad-
vanced users: