91
C-Control Pro Mega Series
© 2008 Conrad Electronic
·
If in a linkage of 8 Bit or 16 Bit integer values one of the two data types is sign
afflicted ("signed") then the result of the expression is also sign afflicted. I. e. the
operation is executed "signed".
·
If one of the operands is of the float type then the result is also of the float type. If
one of the two operands happens to be of the 8 Bit or 16 Bit data type then it will be
converted into a float data type prior to the operation.
5.2.4
Variables
Variables can take on various values depending on the
by which they have been defined.
A variable definition appears as follows:
Type Variable Name;
When several variables of the same type need to be defined then these variables can be stated
separated by commas:
Typ Name1, Name2, Name3, ...;
As types are allowed: char, unsigned char, byte, int, unsigned int, word, float
Examples:
int a;
int i,j;
float xyz;
Integer variables may have decimal figure values or Hex values assigned to. With Hex values the
characters "0x" will be placed ahead of the figure. With variables of the sign afflicted data type
negative decimal figures can be assigned to by putting a minus sign ahead of the figure.
Examples:
word a;
int i,j;
a=
0x3ff
;
i=
15
;
j=-
22
;
Floating Point Figures (data type float) may contain a decimal point and an exponent.
float x,y;
x=
5.70
;
y=
2.3e
+
2
;
x=-
5.33e
-
1
;
Summary of Contents for C-Control Pro Mega Series
Page 1: ... 2008 Conrad Electronic C Control Pro Mega Series ...
Page 9: ...VIII Inhalt 2008 Conrad Electronic ...
Page 10: ...Part 1 ...
Page 17: ...Part 2 ...
Page 23: ...Part 3 ...
Page 41: ...32 Hardware 2008 Conrad Electronic 3 3 5 3 Component Parts Plan ...
Page 57: ...48 Hardware 2008 Conrad Electronic 3 4 5 3 Component Parts Plan ...
Page 58: ...Part 4 ...
Page 91: ...82 IDE 2008 Conrad Electronic ...
Page 92: ...Part 5 ...
Page 135: ...126 Compiler 2008 Conrad Electronic 31 1F US 63 3F 95 5F _ 127 7F DEL ...
Page 136: ...Part 6 ...
Page 231: ...Part 7 ...
Page 240: ......