OBJ-c Property: alternative to setter and getter Methods
The source file extension introduces the introduction of library files # import Basic data type, object type, ID type
Basic data types: int, float, double, and char (the number of bytes is related to the device platform. obj-C is not a cross-platform language) Int % I: 10 hexadecimal % O: 8 hexadecimal % # X: 16 hexadecimal Float: single precision % F % E (Scientific count) % G Double: double % F % E (Scientific count) % g char: % C qualified words long, long, long double, unsigned, signed Object Type: pointer type (static data type) ID type: can replace any data type, but Id type is only applied to object type (dynamic data type) _ Bool (alias bool) type: the value ranges from 0 to 1, 1: True and yes, and 0: false and No. Enumeration type: a group of related Constants Enum direction {up, down, left, right} Up, down, left, and right represent the conversion relationships of the 0, 1, and 2 data types, respectively: Constant const int I = 0; (must have an initial value) bit operator instance
The control statements are basically the same as those in C and Java.