Amiga C Compiler Users Reference Guide.pdf

(1325 KB) Pobierz
Amiga C Compiler User's Reference Guide
AmigaTMC Compiler
User's Reference Guide
Host Operating System: AmigaDOS
Target Processor: 68000
Target Operating System: AmigaDOS
Amiga C was developed by Lattice, Inc.
COPYRIGHT
This manual Copyright © Commodore-Amiga, Inc. and Lattice, Inc., 1986. All Rights
Reserved. This document may not, in whole or In part, be copied, photocopied, reproduced,
translated, or reduced to any electronic medium or machine readable form without prior
consent, In writing, from Commodore-Amiga,
Inc.
This software Copyright © Lattice, Inc., 1986. All Rights Reserved. The distribution and sale
of this product are intended for the use of the original purchaser only. Lawful users of this
program are hereby licensed only to read the program, from Its medium into memory of a
computer, solely for the purpose of executing the program. Duplicating or copying this
product for purposes other than backup, and seiling or otherwise distributing this product are
violations of the law.
DISCLAIMER
THE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK
AS TO THE RESULTS AND PERFORMANCE OF THE PROGRAM IS ASSUMED BY YOU.
SHOULD THE PROGRAM PROVE DEFECTIVE, YOU (AND NOT THE DEVELOPER OR
COMMODORE-AMIGA, INC. OR ITS DEALERS) ASSUME THE ENTIRE COST OF ALL
NECESSARY SERVICING, REPAIR OR CORRECTION. FURTHER, COMMODORE-AMIGA
DOES NOT WARRANT, GUARANTEE, OR MAKE ANY REPRESENTATIONS REGARDING
THE USE OF, OR THE RESULTS OF THE USE OF, THE PROGRAM IN TERMS OF
CORRECTNESS, ACCURACY, RELIABILITY, CURRENTNESS, OR OTHERWISE; AND YOU
RELY ON THE PROGRAM AND THE RESULTS SOLELY AT YOUR OWN RISK. IN NO EVENT
WILL COMMODORE-AMIGA, INC. BE LIABLE FOR DIRECT, INDIRECT, INCIDENTAL OR
CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT IN THE PROGRAM EVEN IF
IT HAS BEEN ADVISED OF THE POSSIBLITY OF SUCH DAMAGES. SOME LAWS DO NOT
ALLOW THE EXCLUSION OR LIMITATION OF IMPLIED WARRANTIES OR LlABLITIES FOR
INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATION OR
EXCLUSION MAY NOT APPLY.
Amiga Is a trademark of Commodore-Amiga, Inc
Lattice is a trademark of Lattice, Inc., P. O. Box 3072, Glen Ellyn, II 60138.
(312) 858-7950, TWX 910-291-2190
IBM and IBMPC are registered trademarks of IBM Corp ..
CBM Product Number 327270-02 rev B
Contents
SECTION 1: Introduction and Basic Concepts
1-1
1.1 Documentation
1-2
1.2 Basic Concepts
1-3
SECTION 2: Language Definition
2-1
2.1 Summary of Differences
2-2
2.1.1·Differences from Previous Versions
2-2
2.1.2 Arbitrary Limitations
2-4
2.2 Major Language Features
2-5
2.2.1 Pre-Processor Features
2-5
2.2.2 Arithmetic Objects
2-7
2.2.3 Derived Objects
2-8
2.2.4 Storage Classes
2-9
2.2.5 Scope of Identifiers
2-11
2.2.6 Initializers
2-12
2.2.7 Expression Evaluation
2-13
2.2.8 Control Flow
2-15
2.3 Comparison to the
C Reference Manual
2-16
2.4 New Language Features
2-23
2.4.1 Void
2-23
2.4.2 Enumerations
2-23
2.4.3 Aggregate Assignment
2-24
2.4.4 Passing Aggregates by Value
2-25
2.4.5 Functions Returning Aggregates
2-26
2.4.6 Function Declarations
with Argument Types
2-26
SECTION 3: Standard Library Functions
3-1
3.1 Memory Allocation Functions
3-2
3.1.1 Level 3 Memory Allocation
3-2
3.1.2 Level 2 Memory Allocation
3-6
3.1.3 Levell Memory Allocation
3-9
3.2 I/O and System Functions
3-12
3.2.1 Level 2 I/O Functions and Macros
3-12
3.2.2 Level 1 I/O Functions
3-40
3.2.3 Program Exit and Jump Functions
3-52
3.3 Utility Functions and Macros
3-56
3.3.1 Memory Utilities
3-56
3.3.2 Character Type Macros
and Functions
3-60
3.3.3 String Utility Functions
3-61
3.3.4 Utility Macros
3-83
3.4 Mathematical Functions
3-83
Zgłoś jeśli naruszono regulamin