Instructions
177 C-Control Pro IDE
© 2013 Conrad Electronic
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:
char str_array[3][40];
char single_str[40];
single_str="A String";
// will copy single_str in the second string of str_array
Str_StrCopy(str_array,single_str,40);
This will work because with a gap of 40 characters after the first string there will in str_array be room
for the second string.
Visibility of Variables
When variables are declared outside of functions then they will have global visibility. I. e. they can be
addressed from every function. Variable declarations within functions produce local variables. Local
variables can only be reached within the function. An example:
int a,b;
void func1(void)
{
int a,x,y;
// global b is accessable
// global a is not accessable since concealed by local a
// local x,y are accessable
// u is not accessable since local to function main
}
void main(void)
{
int u;
// globale a,b are accessable
// local u is accessable