
The Library
Formatted streams : extensible formatted I/O for C++ using object-oriented programming
Tools
Rafter, Mark (1987) Formatted streams : extensible formatted I/O for C++ using object-oriented programming. University of Warwick. Department of Computer Science. (Department of Computer Science research report). (Unpublished)
|
PDF (Department of Computer Science Research Report)
WRAP_cs-rr-107.pdf - Other - Requires a PDF viewer. Download (1425Kb) | Preview |
Abstract
In a language that allows the programmer to define new types, two characteristics of a formatted I/O system are desirable - it should be extensible and type-secure. We make a demand of a language when we require that such a formatted I/O system be expressible entirely within it.
In this paper we demonstrate that C++ is expressive enough to meet this demand. An extension to the C++ stream I/O library is described that provides formatting capabilities in the style of the c stdio library. An example of its use is:
cout["log of %d is %7f"] << x << log(x)
An object-oriented implementation of this extension is described. The language features of C++ that make this implementation possible are identified to encourage the use of this approach with other languages.
Item Type: | Report | ||||
---|---|---|---|---|---|
Subjects: | Q Science > QA Mathematics > QA76 Electronic computers. Computer science. Computer software | ||||
Divisions: | Faculty of Science, Engineering and Medicine > Science > Computer Science | ||||
Library of Congress Subject Headings (LCSH): | C++ (Computer program language) | ||||
Series Name: | Department of Computer Science research report | ||||
Publisher: | University of Warwick. Department of Computer Science | ||||
Official Date: | 19 October 1987 | ||||
Dates: |
|
||||
Number: | Number 107 | ||||
Number of Pages: | 15 | ||||
DOI: | CS-RR-107 | ||||
Institution: | University of Warwick | ||||
Theses Department: | Department of Computer Science | ||||
Status: | Not Peer Reviewed | ||||
Publication Status: | Unpublished | ||||
Related URLs: |
Request changes or add full text files to a record
Repository staff actions (login required)
![]() |
View Item |
Downloads
Downloads per month over past year