Chapter 4. Data Types
4.1 Introduction
4.2 Scalar Numeric Types
4.2.1 The Complex data type
Constructors:
Basic operators:
Non-member functions and operators:
4.2.2 The fixed-point data type
Constructing Fixed-point variables
Warning
Fixed-point states
Fixed-point inputs and outputs
Assignment and overflow handling
Explicitly casting inputs
Constructors:
Functions to set or display information about the Fix number:
Operators:
Conversions:
Fix overflow, rounding, and errors.
4.3 Defining New Data Types
4.3.1 Defining a new Message class
4.3.2 Use of the Envelope class
4.3.3 Use of the MessageParticle class
4.3.4 Use of messages in stars
4.4 The Matrix Data Types
4.4.1 Design philosophy
4.4.2 The PtMatrix class
4.4.3 Public functions and operators for the PtMatrix class
Functions and Operators to access entries of the Matrix:
Constructors:
Comparison operators:
Conversion operators:
Destructive replacement operators:
Non-destructive operators (these return a new matrix):
Non-member binary operators:
Miscellaneous functions:
4.4.4 Writing stars and programs using the PtMatrix class
Memory management
Naming conventions
Include files
Input portholes
Allowing delays on inputs
Matrix outputs
4.4.5 Future extensions
4.5 The File and String Types
4.5.1 The File type
Constructors
Operations
4.5.2 The String type
Constructors
Operations
4.6 Writing Stars That Manipulate Any Particle Type
4.7 Unsupported Types
4.7.1 Sub-matrices
Using sub-matrices in stars
The sub-matrix "particles"
4.7.2 Image particles
4.7.3 "First-class" types
Authors: Joseph T. Buck
Michael J. Chen
Alireza Khazeni
Other Contributors: Brian Evans
Paul Haskell
Asawaree Kalavade
Tom Lane
Edward A. Lee
John Reekie
Copyright © 1990-1997, University of California. All rights reserved.