Complete Practical C Programming 2nd Edition Steve Oualline PDF For All Chapters
Complete Practical C Programming 2nd Edition Steve Oualline PDF For All Chapters
com
https://ebookname.com/product/practical-c-programming-2nd-
edition-steve-oualline/
OR CLICK BUTTON
DOWNLOAD EBOOK
https://ebookname.com/product/practical-uml-statecharts-in-c-c-
event-driven-programming-for-embedded-systems-2nd-edition-miro-
samek/
https://ebookname.com/product/thinking-in-c-volume-2-practical-
programming-bruce-eckel/
https://ebookname.com/product/how-not-to-program-in-c-111-broken-
programs-and-3-working-ones-or-why-does-2-2-5986-1st-edition-
steve-oualline/
https://ebookname.com/product/the-image-of-a-country-created-by-
international-media-1st-edition-elena-tarasheva/
Broadbandits Inside the 750 Billion Telecom Heist 1st
Edition Om Malik
https://ebookname.com/product/broadbandits-inside-
the-750-billion-telecom-heist-1st-edition-om-malik/
https://ebookname.com/product/the-struggle-for-democracy-9th-
edition-edward-s-greenberg/
https://ebookname.com/product/canine-and-feline-nephrology-and-
urology-second-edition-dennis-j-chew-dvm-dacvim/
https://ebookname.com/product/canadian-painters-in-a-modern-
world-1925-1955-writings-and-reconsiderations-2nd-edition-lora-
senechal-carney/
https://ebookname.com/product/nanodevices-for-the-life-sciences-
nanotechnologies-for-the-life-sciences-volume-4-1st-edition-
challa-s-s-r-kumar/
Earthquake Resistant Design of Buildings 1st Edition
Muhammad Hadi (Author)
https://ebookname.com/product/earthquake-resistant-design-of-
buildings-1st-edition-muhammad-hadi-author/
• Table of C ontents
• Index
• Reviews
• Examples
• Reader Reviews
• Errata
Publisher : O'Reilly
Pub Date : December 2002
ISBN : 0-596-00419-2
Pages : 574
Publisher : O'Reilly
Pub Date : December 2002
ISBN : 0-596-00419-2
Pages : 574
C opyright
Preface
Scope of This Handbook
How This Book Is Organized
How to Read This Book If You Already Know C
Font C onventions
How to C ontact Us
Acknowledgments for the First Edition
Acknowledgments for the Second Edition
C hapter 3. Style
Section 3.1. C omments
C olophon
Index
Copyright
Copyright © 2003, 1995 O'Reilly & Associates, Inc.
Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are
registered trademarks of O'Reilly & Associates, Inc. Many of the designations
used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O'Reilly &
Associates, Inc. was aware of a trademark claim, the designations have been
printed in caps or initial caps. The association between the image of an Eastern
chipmunk and the topic of C++ programming is a trademark of O'Reilly &
Associates, Inc.
While every precaution has been taken in the preparation of this book, the
publisher and authors assume no responsibility for errors or omissions, or for
damages resulting from the use of the information contained herein.
Preface
This book is devoted to practical C++ programming. It teaches you not only
the mechanics of the language, but also style and debugging. The entire life
cycle of a program is discussed, including conception, design, writing,
debugging, release, documentation, maintenance, and revision.
Style is emphasized. Creating a good program involves more than just typing
code. It is an art in which writing and programming skills blend to form a
masterpiece. A well-written program not only functions correctly, but also is
simple and easy to understand. Comments allow programmers to include
descriptive text in their programs. Clearly written, well-commented programs
are highly prized.
Consider two programs. One was written by a clever programmer, using all the
tricks. The program contains no comments, but it works. The other is nicely
commented and well structured, but doesn't work. Which program is more
useful? In the long run, the "broken" one is more useful because it can be
fixed and maintained easily. Although the clever one works now, sooner or
later it will have to be modified. The hardest work you will ever have to do is
modifying a cleverly written program.
Scope of This Handbook
The GNU C++ compiler, named g++ (available for most Unix systems[1])
As far as standard C++ is concerned, there are only minor differences among
the various compilers. This book clearly indicates where compiler differences
can affect the programmer. Specific instructions are given for producing and
running programs using each of these compilers. The book also gives examples
of using the programming utility make for automated program production.
How This Book Is Organized
You must crawl before you walk. In Part I, you learn how to crawl. These
chapters teach you enough to write very simple programs. You start with the
mechanics of programming and programming style. Next, you learn how to use
variables and very simple decision and control statements.
At this point you will have learned enough to create very simple programs;
therefore, in Chapter 7, you embark on a complete tour of the programming
process that shows you how real programs are created.
Chapter 1 gives you an overview of C++, describes its history and uses,
and explains how the language is organized.
Chapter 2 explains the basic programming process and gives you enough
information to write a very simple program.
Chapter 6 explains simple decision statements including if, else, and for.
The problem of == versus = is discussed.
Chapter 7 takes you through the steps required for creating a simple
program, from specification through release. Fast prototyping and
debugging are discussed.
Part II describes all the other simple statements and operators that are used in
programming. You also learn how to organize these statements into simple
functions.
In Part III you learn how basic declarations and statements can be used in the
construction of advanced types such as structures, unions, and classes. You
also learn about the concept of pointers.
Advanced programming techniques are explored in Part IV. In this section, you
explore a number of C++ features that let you create complex, yet easy-to-
use objects or classes.
Chapter 23 shows how to split a program into several files and use
modular programming techniques. The make utility is explained in more
detail.
Chapter 25 describes the template library that comes with C++. This
library consists of a number of "container templates" and related data
structures which let you create very complex and robust data structures
with very little work.
Chapter 28 describes how to turn C code into C++ code and addresses
many of the traps lurking in C code that bite the C++ programmer.
Chapter 30 lists programming adages that will help you construct good
C++ programs.
Appendix C lists the rules that determine the order in which operators are
evaluated.
Appendix D contains a program that shows how the computer can compute
the value of the sine function.
C++ is built on the C language. If you know C, you will find much of the
material presented in Chapter 2 through Chapter 12 familiar.
An entirely new I/O system. (The basics are described in Chapter 4. The
new file system is discussed in detail in Chapter 16.)
So you can use C++ as a better C. But C++ has added some entirely new
features such as objects, templates, and exceptions. So starting with Chapter
13, you will begin to learn entirely new concepts.
Font Conventions
Italic
Used for directories and to emphasize new terms and concepts when they
are introduced. Italic is also used to highlight comments in examples.
Bold
Constant width
Used for programs and the elements of a program and in examples to show
the contents of files or the output from commands. A reference in text to a
word or item used in an example or code fragment is also shown in
constant width font.
Constant bold
Constant italic
"Quotes"
...
Stands for text (usually computer output) that's been omitted for clarity or
to save space.
There is a web page for this book, which lists errata, examples, or any
additional information. You can access this page at:
http://www.oreilly.com/catalog/cplus2
To comment or ask technical questions about this book, send email to:
bookquestions@oreilly.com
For more information about books, conferences, Resource Centers, and the
O'Reilly Network, see the O'Reilly web site at:
http://www.oreilly.com/
Acknowledgments for the First Edition
Thanks to Peg Kovar for her proofreading and editing help. Special thanks to
Dale Dougherty for ripping apart my first book and forcing me to put it
together correctly. I greatly appreciate the hard work put in by Phil Straite and
Gregory Satir. I especially thank all those people who reviewed and edited my
book. My thanks also go to the production group at O'Reilly & AssociatesNicole
Gipson, project manager and production editor; John Files, Juliette Muellner,
and Jane Ellin, production assistants; and Mike Sierra, book design
implementor. Finally, special thanks go to all the hard-working programmers
out there whose code has taught me so much.
Acknowledgments for the Second Edition
For the second edition I wish to thank my editor, Robert J. Denn, for his
patience and hard work in getting the book done. Thanks to Ray Lischner for
his technical insight. Al Stevens deserves special recognition for his extensive
knowledge of C++ and his exacting standards. His efforts helped me to tighten
the terminology and refine the examples in the book, resulting in a much more
precise manuscript. Any errors in this book are my own and are not the fault
of the reviewers or of the staff at O'Reilly.
Also I wish to give credit to all the sales and marketing people at O'Reilly who
work so hard to sell my book.
Part I: The Basics
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 1. What Is C++?
Anonymous
The ability to organize and process information is the key to success in the
modern age. Computers are designed to handle and process large amounts of
information quickly and efficiently. However, they can't do anything until
someone tells them what to do. That's where C++ comes in. C++ is a high-
level programming language that allows a software engineer to efficiently
communicate with a computer.
C++ is a highly flexible and adaptable language. Since its creation in 1980, it
has been used for a wide variety of programs including firmware for
microcontrollers, operating systems, applications, and graphics programming.
C++ is the programming language of choice for a tremendous number of
applications. There is a tremendous demand for people who can tell computers
what to do, and C++ lets you do so quickly and efficiently.
1.1 A Brief History of C++
In 1970 two programmers, Brian Kernighan and Dennis Ritchie, created a new
language called C. (The name came about because C was preceded by the old
programming language they were using called B.) C was designed with one
goal in mind: writing operating systems. The language was extremely simple
and flexible and soon was used for many different types of programs. It quickly
became one of the most popular programming languages in the world.
In 1980 Bjarne Stroustrup started working on a new language, called "C with
Classes." This language improved on C by adding a number of new features,
the most important of which was classes. This language was improved,
augmented, and finally became C++.
C++ owes its success to the fact that it allows the programmer to organize and
process information more effectively than most other languages. Also, it builds
on the work already done with the C language. In fact, most C programs can
be transformed into C++ programs with little trouble. These programs usually
don't use all the new features of C++, but they do work. In this way, C++
allows programmers to build on an existing base of C code.
1.2 C++ Organization
C++ is designed as a bridge between the programmer and the raw computer.
The idea is to let the programmer organize a program in a way that he can
easily understand. The compiler then translates the language into something
the machine can use.
Computer programs consist of two main parts: data and instructions. The
computer imposes little or no organization on these two parts. After all,
computers are designed to be as general as possible. The idea is for the
programmer to impose his or her own organization on the computer and not
the other way around.
tells C++ that you want to use a section of the computer's memory to store an
integer named total. You can let the compiler decide what particular bytes of
memory to use; that's a minor bookkeeping detail you don't need to worry
about.
The variable total is a simple variable . It can hold only one integer and
describe only one total. A series of integers can be organized into an array.
Again, C++ will handle the details, imposing that organization on the
computer's memory.
Finally, there are more complex data types. For example, a rectangle might
have a width, a height, a color, and a fill pattern. C++ lets you organize these
four attributes into one group called a structure.
struct rectangle {
int width; // Width of rectangle in p
int height; // Height of rectangle in
color_type color; // Color of the rectangle
fill_type fill; // Fill pattern
};
However, data is only one part of a program; you also need instructions. As far
as the computer is concerned, it knows nothing about the layout of the
instructions. It knows only what it's doing for the current instruction and
where to get the next instruction.
C++ is a high-level language. It lets you write a high-level statement such as:
You can also use control statements to control the order of processing.
Statements such as the if and switch statements enable the computer to
make simple decisions. Statements can be repeated by using looping
statements such as while and for.
Groups of statements can be wrapped to form functions. Thus you only need to
write a general-purpose function to draw a rectangle once, and you can reuse
that function whenever you want to draw a new rectangle. C++ provides a rich
set of standard functions that perform common functions such as searching,
sorting, input, and output. A set of related functions can be grouped together
to form a module, and modules are linked to form programs.
One of the major goals of the C++ language is to organize instructions into
reusable components. After all, you can write programs much faster if you
"borrow" most of your code from somewhere else. Groups of reusable modules
can be combined into a library. For example, if you need a sort routine, you
can use the standard function qsort from the library and link it into your
program.
A computer divides the world into data and instructions. For a long time, high-
level languages such as C kept that dividing line in place. In C you can define
data or write instructions, but you can't combine the two.
One of C++'s major innovations is the idea of combining data and instructions
together in a construct called a class or object. Object-oriented programming
allows you to group data with the operations that can be performed on that
data. This concept is taken a step further in C++ by letting you derive new
classes from existing ones.
This last feature is extremely powerful. It allows you to build complex classes
on top of smaller, simpler ones. It also allows you to define a basic, abstract
class and then derive specific classes from it. For example, an abstract class of
shape might be used to define the shapes rectangle, triangle, and
circle.
Organization is the key to writing good programs. In this book, you know that
the table of contents is in the front and the index is in the back, because that's
the way books are organized. Organization makes this book easier to use.
The C++ language lets you organize your programs using a simple yet
powerful syntax. This book goes beyond the C++ syntax and teaches you style
rules that enable you to create highly readable and reliable programs. By
combining a powerful syntax with good programming style, you can create
powerful programs that perform complex and wonderful operations.
1.3 How to Learn C++
The only way to learn how to program is to write programs. You'll learn a lot
more by writing and debugging programs than you ever will by reading this
book. This book contains many programming exercises, and you should try to
do as many of them as possible. When doing the exercises, keep good
programming style in mind. Always comment your programs, even if you're
doing the exercises only for yourself. Commenting helps you organize your
thoughts, and commenting your own programs is good practice for when you
go into the "real world."
Don't let yourself be seduced by the idea that, "I'm only writing these
programs for myself, so I don't need to comment them." First of all, code that
looks obvious to you when you write it can often be confusing and cryptic
when you revisit it a week later. Writing comments also helps you organize
your ideas. (If you can write out an idea in English, you are halfway to writing
it in C++.)
Finally, programs tend to be around far longer than expected. I once wrote a
highly system-dependent program that was designed to work only on the
computer at Caltech. As I was the only one who would ever use the program,
it would print the following message if I got the command line wrong:
A few years later I was a student at Syracuse University. The chief secretary at
the School of Computer Science needed a program similar to my Caltech
listing program, so I adapted my program for her use. Unfortunately, I had
forgotten about my funny little error message.
Imagine how horrified I was when I came into the Computer Science office and
was accosted by the chief secretary. This lady had so much power she could
make the dean cringe. She looked at me and said, "User is a twit, huh?"
Luckily she had a sense of humor, or I might not be here today.
Sprinkled throughout are not only examples of working programs (to show you
how to do things), but also examples of broken programs where we ask you to
go through the program and figure out what's wrong. Often the problem is
very subtle, such as a misplaced semicolon or use of = instead of ==. These
programs let you learn how to spot mistakes in a small program. That way
when you make similar mistakes in a big programand you will make
mistakesyou will be trained to spot them.
Another Random Document on
Scribd Without Any Related Topics
CHAP. III.
Truth. In the answer, Mr. Cotton first lays down several distinctions
and conclusions of his own, tending to prove persecution.
Secondly. Answers to the scriptures and arguments proposed
against persecution.
Peace. The first distinction is this: by persecution The first
for cause of conscience, “I conceive you mean distinction
either for professing some point of doctrine which discussed.
you believe in conscience to be the truth, or for practising some
work which you believe in conscience to be a religious duty.”
Truth. I acknowledge that to molest any person, Definition of
Jew or Gentile, for either professing doctrine, or persecution
practising worship merely religious or spiritual, it is discussed.
to persecute him; and such a person, whatever his doctrine or
practice be, true or false, suffereth persecution for conscience.
But withal I desire it may be well observed, that Conscience will
this distinction is not full and complete. For beside not be restrained
this, that a man may be persecuted because he from its own
worship, nor
holdeth or practiseth what he believes in constrained to
conscience to be a truth, as Daniel did, for which another.
he was cast into the lions’ den, Dan. vi. 16, and
many thousands of Christians, because they durst not cease to
preach and practise what they believed was by God commanded, as
the apostles answered, Acts iv. and v., I say, besides this, a man may
also be persecuted because he dares not be constrained to yield
obedience to such doctrines and worships as are by men invented
and appointed. So the three famous Jews, who were cast into the
fiery furnace for refusing to fall down, in a nonconformity to the
whole conforming world, before the golden image, Dan. iii. 21.[96]
So thousands of Christ’s witnesses, and of late in those bloody
Marian days, have rather chosen to yield their bodies to all sorts of
torments, than to subscribe to doctrines, or practise worships, unto
which the states and times (as Nebuchadnezzar to his golden image)
have compelled and urged them.
A chaste wife will not only abhor to be restrained A chaste soul in
from her husband’s bed as adulterous and polluted, God’s worship,
but also abhor (if not much more) to be like a chaste wife.
constrained to the bed of a stranger. And what is abominable in
corporal, is much more loathsome in spiritual whoredom and
defilement.
The spouse of Christ Jesus, who could not find her soul’s beloved
in the ways of his worship and ministry, Cant. i., iii., and v. chapters,
abhorred to turn aside to other flocks, worships, &c., and to embrace
the bosom of a false Christ, Cant. i. 8.
CHAP. IV.
Peace. The second distinction is this:—
“In points of doctrine some are fundamental, The second
without right belief whereof a man cannot be distinction
saved; others are circumstantial and less principal, discussed.
wherein a man may differ in judgment without prejudice of salvation
on either part.”
Truth. To this distinction I dare not subscribe, for God’s people may
then I should everlastingly condemn thousands, err from the very
and ten thousands, yea, the whole generation of fundamentals of
visible worship.
the righteous, who since the falling away from the
first primitive Christian state or worship, have and do err
fundamentally concerning the true matter, constitution, gathering,
and governing of the church. And yet, far be it from any pious breast
to imagine that they are not saved, and that their souls are not
bound up in the bundle of eternal life.[97]
We read of four sorts of spiritual, or Christian, foundations in the
New Testament.
First, the foundation of all foundations, the Four sorts of
corner-stone itself, the Lord Jesus, on whom all spiritual
foundations.
depend—persons, doctrines, practices, 1 Cor. iii.
[11.]
2. Ministerial foundations. The church is built upon the foundation
of the apostles and prophets, Ephes. ii. 20.
3. The foundation of future rejoicing in the fruits of obedience, 1
Tim. vi. [19.]
4. The foundation of doctrines, without the Στοιχεῖα, θεμὲιοὶ.
knowledge of which there can be no true The six
foundations of the
profession of Christ, according to the first
institution, Heb. vi. [1, 2,]—the foundation, or
principles, of repentance from dead works, faith Christian religion
or worship.
towards God, the doctrine of baptisms, laying on of
hands, the resurrection, and eternal judgment. In some of these, to
wit, those concerning baptisms and laying on of hands, God’s people
will be found to be ignorant for many hundred years; and I yet
cannot see it proved that light is risen, I mean the light of the first
institution, in practice.
God’s people in their persons, heart-waking (Cant. v. 2), in the life
of personal grace, will yet be found fast asleep in respect of public
Christian worship.
God’s people, in their persons, are His, most Coming out of
dear and precious: yet in respect of the Christian Babel, not local,
worship they are mingled amongst the but mystical.
Babylonians, from whence they are called to come out, not locally,
as some have said, for that belonged to a material and local Babel
(and literal Babel and Jerusalem have now no difference, John iv.
21), but spiritually and mystically to come out from her sins and
abominations.
If Mr. Cotton maintain the true church of Christ The great
to consist of the true matter of holy persons called ignorance of
out from the world (and the true form of union in a God’s people
concerning the
church government), and that also neither national, nature of the true
provincial, nor diocesan churches are of Christ’s church.
institution: how many thousands of God’s people of
all sorts, clergy and laity, as they call them, will they find, both in
former and later times, captivated in such national, provincial, and
diocesan churches? yea, and so far from living in, yea or knowing of
any such churches, for matter and form, as they conceive now only
to be true, that until of late years, how few of God’s people knew
any other church than the parish church of dead stones or timber? It
being a late marvellous light, revealed by Christ Jesus, the Sun of
righteousness, that his people are a company or church of living
stones, 1 Pet. ii. 9.
And, however his own soul, and the souls of Mr. Cotton and all
many others, precious to God, are persuaded to the half
separate from national, provincial, and diocesan separatists,
halting between
churches, and to assemble into particular churches, true and false
yet, since there are no parish churches in England, churches, and
but what are made up of the parish bounds within consequently not
yet clear in the
such and such a compass of houses, and that such fundamental
churches have been and are in constant matter of a
dependence on, and subordination to the national Christian church.
church: how can the New English particular churches join with the
old English parish churches in so many ordinances of word, prayer,
singing, contribution, &c., but they must needs confess, that as yet
their souls are far from the knowledge of the foundation of a true
Christian church, whose matter must not only be living stones, but
also separated from the rubbish of anti-christian confusions and
desolations.
CHAP. V.
Peace. With lamentation, I may add, how can their souls be clear
in this foundation of the true Christian matter, who persecute and
oppress their own acknowledged brethren, presenting light unto
them about this point? But I shall now present you with Mr. Cotton’s
third distinction. “In points of practice,” saith he, “some concern the
weightier duties of the law, as what God we worship, and with what
kind of worship; whether such, as if it be right, fellowship with God
is held; if false, fellowship with God is lost.”
Truth. It is worth the inquiry, what kind of worship he intendeth:
for worship is of various signification. Whether in general acceptation
he mean the rightness or corruptness of the church, or the ministry
of the church, or the ministrations of the word, prayer, seals, &c.
And because it pleaseth the Spirit of God to The true ministry
make the ministry one of the foundations of the a fundamental.
Christian religion, Heb. vi. 1, 2, and also to make
the ministry of the word and prayer in the church to be two special
works, even of the apostles themselves, Acts vi. 2, I shall desire it
may be well considered in the fear of God.[98]
First, concerning the ministry of the word. The The New English
New English ministers, when they were new ministers
elected and ordained ministers in New England, examined.
must undeniably grant, that at that time they were no ministers,
notwithstanding their profession of standing so long in a true
ministry in old England, whether received from the bishops, which
some have maintained true, or from the people, which Mr. Cotton
and others better liked, and which ministry was always accounted
perpetual and indelible. I apply, and ask, will it not follow, that if
their new ministry and ordination be true, the former was false? and
if false, that in the exercise of it, notwithstanding abilities, graces,
intentions, labours, and, by God’s gracious, unpromised, and
extraordinary blessing, some success, I say, will it not according to
this distinction follow, that according to visible rule, fellowship with
God was lost?
Secondly, concerning prayer. The New English Common prayer
ministers have disclaimed and written against that cast off, and
worshipping of God by the common or set forms of written against by
the New English.
prayer, which yet themselves practised in England,
notwithstanding they knew that many servants of God, in great
sufferings, witnessed against such a ministry of the word, and such
a ministry of prayer.
Peace. I could name the persons, time, and place, when some of
them were faithfully admonished for using of the Common Prayer,
and the arguments presented to them, then seeming weak, but now
acknowledged sound; yet, at that time, they satisfied their hearts
with the practice of the author of the Council of Trent, who used to
read only some of the choicest selected prayers in the mass-book,
which I confess was also their own practice in their using of the
Common Prayer.[99] But now, according to this distinction, I ask
whether or no fellowship with God in such prayers was lost?
Truth. I could particularize other exercises of God’s people have
worship, which cannot be denied, according to this worshipped God
distinction, to be of the weightier points of the law: with false
worships.
to wit, what God we worship, and with what kind
of worship? wherein fellowship with God, in many of our unclean
and abominable worships, hath been lost. Only upon these premises
I shall observe: first, that God’s people, even the standard-bearers
and leaders of them, according to this distinction, have worshipped
God, in their sleepy ignorance, by such a kind of worship as wherein
fellowship with God is lost; yea also, that it is possible for them to
do, after much light is risen against such worship, and in particular,
brought to the eyes of such holy and worthy persons.
Secondly, there may be inward and secret fellowship with God in
false ministries of word and prayer, (for that to the eternal praise of
infinite mercy, beyond a word or promise of God, I
acknowledge[100]) when yet, as the distinction saith, in such
worship, not being right, fellowship with God is lost, and such a
service or ministration must be lamented and forsaken.
Thirdly, I observe that God’s people may live and Fundamentals of
die in such kinds of worship, notwithstanding that Christian worship
light from God, publicly and privately, hath been not so easy and
clear.
presented to them, able to convince; yet, not
reaching to their conviction, and forsaking of such ways, contrary to
a conclusion afterward expressed; to wit, “that fundamentals are so
clear, that a man cannot but be convinced in conscience, and
therefore that such a person not being convinced, he is condemned
of himself, and may be persecuted for sinning against his
conscience.”
Fourthly, I observe, that in such a maintaining a clearness of
fundamentals or weightier points, and upon that ground a
persecuting of men because they sin against their consciences, Mr.
Cotton measures that to others, which himself when he lived in such
practices would not have had measured to himself. As first, that it
might have been affirmed of him, that in such practices he did sin
against his conscience, having sufficient light shining about him.
Secondly, that he should or might lawfully have been cut off by
death or banishment, as an heretic, sinning against his own
conscience.
And in this respect the speech of king James was A notable speech
notable to a great nonconformitant, converted, as of king James to a
is said, by king James to conformity, and great nonconformist,
counselling the king afterward to persecute the turned persecutor.
nonconformists even unto death: “Thou beast,”
quoth the king, “if I had dealt so with thee in thy nonconformity,
where hadst thou been?”
CHAP. VI.
Peace. The next distinction concerneth the The four
manner of persons holding forth the aforesaid distinctions
discussed.
practices, not only the weightier duties of the law,
but points of doctrine and worship less principal:—
“Some,” saith he, “hold them forth in a meek and peaceable way;
some with such arrogance and impetuousness, as of itself tendeth to
the disturbance of civil peace.”
Truth. In the examination of this distinction we shall discuss,
First, what is civil peace (wherein we shall vindicate thy name the
better),
Secondly, what it is to hold forth a doctrine, or practice, in this
impetuousness or arrogancy.
First, for civil peace, what is it but pax civitatis, What civil peace
the peace of the city, whether an English city, is.
Scotch, or Irish city, or further abroad, French,
Spanish, Turkish city, &c.
Thus it pleased the Father of lights to define it, God’s people must
Jer. xxix. 7, Pray for the peace of the city; which be
peace of the city, or citizens, so compacted in a nonconformitants
to evil.
civil way of union, may be entire, unbroken, safe,
&c., notwithstanding so many thousands of God’s people, the Jews,
were there in bondage, and would neither be constrained to the
worship of the city Babel, nor restrained from so much of the
worship of the true God as they then could practice, as is plain in the
practice of the three worthies, Shadrach, Meshach, and Abednego,
as also of Daniel, Dan. iii. and Dan. vi.—the peace of the city or
kingdom being a far different peace from the peace of the religion,
or spiritual worship, maintained and professed of the citizens. This
peace of their (worship which worship also in some cities being
various) being a false peace, God’s people were and ought to be
nonconformitants, not daring either to be restrained from the true,
or constrained to false worship; and yet without breach of the civil or
city peace, properly so called.
Peace. Hence it is that so many glorious and The difference
flourishing cities of the world maintain their civil between spiritual
peace; yea, the very Americans and wildest pagans and civil peace.
keep the peace of their towns or cities, though neither in one nor
the other can any man prove a true church of God in those places,
and consequently no spiritual and heavenly peace. The peace
spiritual, whether true or false, being of a higher and far different
nature from the peace of the place or people, being merely and
essentially civil and human.
Truth. Oh! how lost are the sons of men in this The difference
point! To illustrate this:—the church, or company of between the
worshippers, whether true or false, is like unto a spiritual and civil
state. The civil
body or college of physicians in a city—like unto a state, the spiritual
corporation, society, or company of East India or estate, and the
Turkey merchants, or any other society or company church of Christ
distinct in
in London; which companies may hold their courts, Ephesus.
keep their records, hold disputations, and in
matters concerning their society may dissent, divide, break into
schisms and factions, sue and implead each other at the law, yea,
wholly break up and dissolve into pieces and nothing, and yet the
peace of the city not be in the least measure impaired or disturbed;
because the essence or being of the city, and so the well being and
peace thereof, is essentially distinct from those particular societies;
the city courts, city laws, city punishments distinct from theirs. The
city was before them, and stands absolute and entire when such a
corporation or society is taken down. For instance further, the city or
civil state of Ephesus was essentially distinct from the worship of
Diana in the city, or of the whole city. Again, the church of Christ in
Ephesus, which were God’s people, converted and called out from
the worship of that city unto Christianity, or worship of God in Christ,
was distinct from both.
Now suppose that God remove the candlestick from Ephesus, yea,
though the whole worship of the city of Ephesus should be altered,
yet, if men be true and honestly ingenuous to city covenants,
combinations, and principles, all this might be without the least
impeachment or infringement of the peace of the city of Ephesus.
Thus in the city of Smyrna was the city itself or civil estate one
thing, the spiritual or religious state of Smyrna another: the church
of Christ in Smyrna distinct from them both. And the synagogue of
the Jews, whether literally Jews, as some think, or mystically false
Christians, as others, called the synagogue of Satan, Rev. ii., [was]
distinct from all these. And notwithstanding these spiritual
oppositions in point of worship and religion, yet hear we not the
least noise—nor need we, if men keep but the bond of civility, of any
civil breach, or breach of civil peace amongst them; and to
persecute God’s people there for religion, that only was a breach of
civility itself.
CHAP. VII.
Peace. Now to the second query, what it is to hold forth doctrine
or practice in an arrogant or impetuous way?
Truth. Although it hath not pleased Mr. Cotton to The answerer too
declare what is this arrogant or impetuous holding obscure in
forth of doctrine or practice tending to disturbance generals. God’s
meekest servants
of civil peace, I cannot but express my sad and use to be counted
sorrowful observation, how it pleaseth God to leave arrogant and
him as to take up the common reproachful impetuous.
accusation of the accuser of God’s children: to wit, that they are
arrogant and impetuous. Which charge, together with that of
obstinacy, pertinacity, pride, troublers of the city, &c., Satan
commonly loads the meekest of the saints and witnesses of Jesus
with.
To wipe off, therefore, these foul blurs and Six cases wherein
aspersions from the fair and beautiful face of the God’s people have
spouse of Jesus, I shall select and propose five or been bold and
zealous, yet not
six cases, for which God’s witnesses, in all ages arrogant.
and generations of men, have been charged with
arrogance, impetuousness, &c., and yet the God of heaven, and
Judge of all men, hath graciously discharged them from such crimes,
and maintained and avowed them for his faithful and peaceable
servants.
First, God’s people have proclaimed, taught, Christ Jesus and
disputed, for divers months together, a new religion his disciples teach
and worship, contrary to the worship projected in publicly
doctrine,
a new