Presentation is loading. Please wait.

Presentation is loading. Please wait.

Windows Programming, C.-S. Shieh, KUAS EC, 20051 Chapter 3 Operators and Expressions.

Similar presentations


Presentation on theme: "Windows Programming, C.-S. Shieh, KUAS EC, 20051 Chapter 3 Operators and Expressions."— Presentation transcript:

1 Windows Programming, C.-S. Shieh, KUAS EC, 20051 Chapter 3 Operators and Expressions

2 Windows Programming, C.-S. Shieh, KUAS EC, 20052 3.2 Naming Rules for Identifiers Consist of A-Z, a-z, 0-9, and _. First character must not be 0-9. No confliction with reserved words. Case sensitive. No Chinese.

3 Windows Programming, C.-S. Shieh, KUAS EC, 20053 3.3 Basic Data Types C++ Builder Basic Data Types –char, int, long, float, double –bool: true or false AnsiString Type –There is no string type in C, only array of char. –AnsiString type makes string manipulation easy. AnsiString x,y,z; x=”Hello”;y=”world!”; z=x+”, ”+y;

4 Windows Programming, C.-S. Shieh, KUAS EC, 20054 3.4 C++ Operators Arithmetic: +,-,*,/,% Assignment: =,+=,-=,*=,/=,%=,&=,|= Relational: ==,!=,, = Logical: &&,||,! Bit-wise logic operator: &,|,~ Increment and decrement: ++,--

5 Windows Programming, C.-S. Shieh, KUAS EC, 20055 3.5 Data Representations ASCII –American Standard Code for Information Interchange –One byte per character Chinese Big-5 –Two byte per Chinese character

6 Windows Programming, C.-S. Shieh, KUAS EC, 20056 3.6 Number Systems Position-Weighted System –Decimal 12.34 –Binary (10.101) 2 =2.625 –Hexadecimal (1A.2B) 16 =26.16796875


Download ppt "Windows Programming, C.-S. Shieh, KUAS EC, 20051 Chapter 3 Operators and Expressions."

Similar presentations


Ads by Google