Class Bertl added

Dependencies:   HCSR

Dependents:   BERTL_ButtonLeds Bertl_Arbeit FollowLine SerialPC ... more

Fork of ur_Bertl by BULME_BERTL_2CHEL

You are viewing an older revision! See the latest version

Datentypen

TypeKeywordBytesRange
characterchar1-128 .. 127
unsigned characterunsigned char10 .. 255
integerint2-32 768 .. 32 767
short integershort2-32 768 .. 32 767
long integerlong4-2 147 483 648 .. 2 147 483 647
unsigned integerunsigned int20 .. 65 535
unsigned short integerunsigned short20 .. 65 535
unsigned long integerunsigned long40 .. 4 294 967 295
single-precision floating-point (7 Stellen)float41.17E-38 .. 3.4E38
double-precision floating-point (19 Stellen)double82.2E-308 .. 1.8E308
KeywordBytesRangeC-Entsprechung (gcc)
int8_t1−128 .. 127signed char
int16_t2−32768 .. 32767signed short, signed int
int32_t4−2147483648 .. 2147483647signed long
int64_t8−9223372036854775808 .. 9223372036854775807signed long long
KeywordBytesRangeC-Entsprechung (gcc)
uint8_t10 ..255unsigned char
uint16_t20 .. 65535unsigned short, unsigned int
uint32_t40 .. 4294967295unsigned long
uint64_t80 .. 18446744073709551615unsigned long long
CharacterTypeOutput format
C, cinta single-byte character
dintSigned decimal integer.
iintSigned decimal integer.
ointUnsigned octal integer.
uintUnsigned decimal integer.
X, xintUnsigned hexadecimal integer
E, e, f, G, gdoubleSigned value; form [–]d.dddd e [-]dd[d]
pPointerPrints the address of the argument in hex.
S, sStringspecifies a single-byte–character string.

Macro PRIu8

  1. define PRIu8 "u"

decimal printf format for uint8_t

uint8_t val = karel.GetLineValues(); bt.printf("%x \n",val); hex bt.printf("%u \n",val); dec


All wikipages