www.riscos.com Technical Support: |
|
Acorn C/C++ is a development environment for producing RISC OS desktop applications and relocatable modules written in ANSI C and/or in C++. It consists of a number of programming tools which are RISC OS desktop applications. These tools interact in ways designed to help your productivity, forming an extendable environment integrated by the RISC OS desktop. Acorn C/C++ may be used with Acorn Assembler (a part of this product) to provide an environment for mixed C, C++ and assembler development.
Acorn C/C++ includes tools to:
Most of the tools in this product are also of general use for constructing applications in other programming languages, such as ARM Assembler. These non-language-specific tools are described in the accompanying Desktop Tools guide.
Installation of Acorn C/C++ is described in the Installing Acorn C/C++ of the accompanying Desktop Tools guide .
The Acorn C compiler for RISC OS (the tool CC supplied as a part of this product) is a full implementation of C as defined by the 1989 ANSI language standard. To obtain this standard document, see the chapter entitled Useful references. It is tested with the Plum-Hall C Validation Suite version 2.00, and passes all sections, except for failing to produce two required diagnostic messages, as described in the release note accompanying this user guide.
This guide is a reference manual for the C tools CC, C++, CMHG, ToANSI and ToPCC working as part of the development environment of Acorn C/C++. These are the only tools in this product which are not used for programming in other languages, and already described in the accompanying Desktop Tools guide. This manual also documents the C and C++ library support provided and other aspects that are particular to this C product:
This guide is not intended as an introduction to C or C++, and does not teach C or C++ programming; nor is it a reference manual for the ANSI C standard. Both these needs are addressed by publications listed in the Useful references.
This guide is organised into parts:
Part 1 - Using the C tools
Part 2 - C language issues
Part 3 - C++ language issues
Part 4 - Developing software for RISC OS
Part 5 - Appendixes
This part of the guide describes the operation of the programming tools specific to C. The first chapter describes the interaction of the C tools with the rest of the development environment; each of the remaining chapters is devoted to an individual tool. Examples in the text and on disc are used to illustrate several points.
The chapters are:
This covers issues to do with the C programming language itself, in particular those parts of the ANSI standard that are necessarily machine- or operating system-specific.
The chapters are:
How Acorn C implements those aspects of the language which ANSI leaves to the discretion of the implementor; and how Acorn C behaves in those areas covered by Appendix A.6 of the draft standard (which lists those aspects which the standard requires each implementation to define).
This chapter works through the headers of the C library, (assert.h to time.h), outlining the contents of each one:
This chapter details the ANSI library, a superset of the C library that provides additional features useful in debugging and profiling your software.
This chapter details the Event library, which provides calls for you to more easily dispatch Toolbox and Wimp events within Toolbox based applications.
This chapter documents the Wimp library, which provides a set of C veneers onto the Wimp (or Window Manager) SWI interface.
This chapter documents the Toolbox library, which provides a set of C veneers onto the Toolbox SWIs.
This chapter documents the Render library, which provides a set of C veneers onto the DrawFile SWIs, used to render Draw files.
This covers issues to do with the C++ programming language, such as details of its implementation and of the libraries supplied with it.
This chapter describes implementation specific behaviour of Acorn C++.
This chapter describes the C++ Streams library, giving a synopsis (including prototypes) and a description of each available interface.
This chapter describes the C++ Complex Math library, giving a synopsis (including prototypes) and a description of each available interface.
This part of the Guide tells you how to write software in C for the RISC OS environment. Examples in the text and on disc are used to illustrate each type of program development. It also includes a chapter on portability to help with porting applications in C to and from RISC OS.
The chapters are:
The chapter covers:
How to handle procedure entry and exit in assembly language, so that you can write programs which interface correctly with the code produced by the C compiler.
Relocatable modules - the building blocks of the RISC OS operating system - are needed for device drivers and similar low-level software.
This chapter explains how to write an application using overlays, with a worked example as an illustration.
The appendixes are:
This is the fifth release of the C compiler product for Acorn computers running the RISC OS operating system. The appendix highlights all those features that are new since the previous release (Acorn Desktop C).
Messages produced by the compiler, of varying degrees of severity.
Messages produced by the translator, of varying degrees of severity.
Throughout this Guide, a fixed-width font is used for text that the user should type, with an italic version representing classes of item that would be replaced in the command by actual objects of the appropriate type. For example:
cc options filenames
This means that you type cc exactly as shown, and replace options and filenames by specific examples.
Where it is necessary to differentiate between text you type, and that output by the computer, your input is shown in bold, and the computer's response in a normal weight.
This is a very thorough reference guide to C, including a useful amount of information on the ANSI C standard.
Since the Acorn C compiler is an ANSI compiler, this book is particularly relevant, but you must get the second edition for coverage of the ANSI standard.
This is the original C 'bible', updated to cover the essentials of ANSI C too.
This book explains how to avoid the most common traps and pitfalls that ensnare even the most experienced C programmers. It provides informative reading at all levels.
The standard book describing the C++ language, including a complete copy of the Reference Manual.
The original Reference Manual, used as an ANSI base document, with additional annotations and commentary sections.
The American National Standard for Information Systems - Programming Language C is available with the reference number ANSI X3.159-1989 for £45.00 from:
British Standards Institution
Foreign Sales Department
Linford Wood
Milton Keynes
MK14 6LE
Members of the BSI can order copies by telephone; non-members should send a cheque payable to BSI.
However, you should find the coverage of ANSI C in this manual and the books listed above adequate for all but the most demanding requirements.
At the time of going to press, the ANSI standard for C++ was not yet published - but it is unlikely to deviate significantly from The Annotated C++ Reference Manual referred to above.