Instructions

189 C-Control Pro IDE
© 2013 Conrad Electronic
is only the reference (pointer) to the array variable text.
Presently arrays can only be passed "by Reference"!
Pointer Arithmetic
In the current C-Control Pro software also arithmetic on a reference (pointer) is permitted, as the fol-
lowing example shows. The arithmetic is limited to addition, subtraction, multiplication and division.
void main(void)
{
int len;
char text[15];
text="hello world";
len=StringLength(text+2*3);
}
Pointer arithmetic is currently experimental and may possibly still contain errors.
Strings as Parameter
Since Version 2.0 of the IDE it is possible to call functions with a string as parameter. The called
function gets the string as reference. Since references are RAM based and predefined strings are
stored in the flash memory, the compiler creates internally an anonymous variable, and copies the
data from flash into memory.
int StringLength(char str[])
{
...
}
void main(void)
{
int len;
len=StringLength("hallo welt");
}
4.2.8 Tabellen
4.2.8.1 Operator Precedence
Rang
Operator
13
( )
12
++ -- ! ~ - (negatives Vorzeichen)
11
* / %