ccs_c_manual.pdf

(1210 KB) Pobierz
C Compiler
Reference Manual
June 2008
This manual documents software version 4.
Review the readme.txt file in the product directory for changes made since this version.
Copyright © 1994, 2008 Custom Computer Services, Inc.
All rights reserved worldwide. No part of this work may be reproduced or copied in any form or by
any means- electronic, graphic, or mechanical, including photocopying, recording, taping, or
information retrieval systems without prior permission.
Table Of Contents
Overview........................................................................................................................................... 1
PCB, PCM and PCH Overview ..................................................................................................... 1
Installation .................................................................................................................................... 1
Technical Support ........................................................................................................................ 2
Directories .................................................................................................................................... 2
File Formats.................................................................................................................................. 3
Invoking the Command Line Compiler....................................................................................... 4
PCW Overview .............................................................................................................................. 6
Program Syntax ............................................................................................................................. 17
Overall Structure ........................................................................................................................ 17
Comment..................................................................................................................................... 17
Trigraph Sequences................................................................................................................... 19
Multiple Project Files ................................................................................................................. 19
Multiple Compilation Units ........................................................................................................ 20
Example ...................................................................................................................................... 22
Statements ..................................................................................................................................... 23
Statements.................................................................................................................................. 23
if ................................................................................................................................................... 24
while ............................................................................................................................................ 25
do................................................................................................................................................. 25
do-while....................................................................................................................................... 25
for ................................................................................................................................................ 26
switch .......................................................................................................................................... 26
return........................................................................................................................................... 27
goto ............................................................................................................................................. 27
label ............................................................................................................................................. 27
break............................................................................................................................................ 28
continue ...................................................................................................................................... 28
expr.............................................................................................................................................. 28
; .................................................................................................................................................... 29
stmt.............................................................................................................................................. 29
Expressions ................................................................................................................................... 31
Expressions................................................................................................................................ 31
Operators .................................................................................................................................... 31
operator precedence.................................................................................................................. 33
Reference Parameters ............................................................................................................... 34
Variable Argument Lists ............................................................................................................ 34
Default Parameters..................................................................................................................... 35
Overloaded Functions ............................................................................................................... 36
Data Definitions ............................................................................................................................. 37
Basic and Special types ............................................................................................................ 37
Declarations................................................................................................................................ 41
Non-RAM Data Definitions......................................................................................................... 41
Using Program Memory for Data .............................................................................................. 43
Function Definition..................................................................................................................... 45
v
Zgłoś jeśli naruszono regulamin