Programming Principles and Practice Using C 3rd Edition Stroustrup download
Programming Principles and Practice Using C 3rd Edition Stroustrup download
https://textbookfull.com/product/programming-principles-and-
practice-using-c-3rd-edition-stroustrup/
https://textbookfull.com/product/programming-principles-and-
practice-using-c-second-edition-stroustrup/
https://textbookfull.com/product/programming-principles-and-
practice-using-c-third-edition-bjarne-stroustrup/
https://textbookfull.com/product/a-tour-of-c-3rd-edition-
stroustrup-b/
https://textbookfull.com/product/tour-of-c-a-c-in-depth-
series-3rd-edition-stroustrup/
A Tour of C++ Stroustrup
https://textbookfull.com/product/a-tour-of-c-stroustrup/
https://textbookfull.com/product/a-tour-of-c-stroustrup-2/
https://textbookfull.com/product/introduction-to-computation-and-
programming-using-python-3rd-edition-john-v-guttag/
https://textbookfull.com/product/introduction-to-computation-and-
programming-using-python-3rd-edition-john-v-guttag-2/
https://textbookfull.com/product/principles-and-practice-of-
radiation-oncology-7th-edition-edward-c-halperin/
About This eBook
ePUB is an open, industry-standard format for eBooks.
However, support of ePUB and its many features varies
across reading devices and applications. Use your device or
app settings to customize the presentation to your liking.
Settings that you can customize often include font, font size,
single or double column, landscape or portrait mode, and
figures that you can click or tap to enlarge. For additional
information about the settings and features on your reading
device or app, visit the device manufacturer’s Web site.
Many titles include programming code or configuration
examples. To optimize the presentation of these elements,
view the eBook in single-column, landscape mode and
adjust the font size to the smallest setting. In addition to
presenting code and configurations in the reflowable text
format, we have included images of the code that mimic the
presentation found in the print book; therefore, where the
reflowable format may compromise the presentation of the
code listing, you will see a “Click here to view code image”
link. Click the link to view the print-fidelity code image. To
return to the previous page viewed, click the Back button on
your device or app.
Programming: Principles
and Practice Using C++
Third Edition
Bjarne Stroustrup
ISBN-13: 978-0-13-830868-1
ISBN-10: 0-13-83086-3
First printing, May 2024
$PrintCode
Contents
Preface
1 Hello, World!
1.1 Programs
1.2 The classic first program
1.3 Compilation
1.4 Linking
1.5 Programming environments
3 Computation
3.1 Computation
3.2 Objectives and tools
3.3 Expressions
3.4 Statements
3.5 Functions
3.6 vector
3.7 Language features
4 Errors!
4.1 Introduction
4.2 Sources of errors
4.3 Compile-time errors
4.4 Link-time errors
4.5 Run-time errors
4.6 Exceptions
4.7 Avoiding and finding errors
5 Writing a Program
5.1 A problem
5.2 Thinking about the problem
5.3 Back to the calculator!
5.4 Back to the drawing board
5.5 Turning a grammar into code
5.6 Trying the first version
5.7 Trying the second version
5.8 Token streams
5.9 Program structure
6 Completing a Program
6.1 Introduction
6.2 Input and output
6.3 Error handling
6.4 Negative numbers
6.5 Remainder: %
6.6 Cleaning up the code
6.7 Recovering from errors
6.8 Variables
10 A Display Model
10.1 Why graphics?
10.2 A display model
10.3 A first example
10.4 Using a GUI library
10.5 Coordinates
10.6 Shapes
10.7 Using Shape primitives
10.8 Getting the first example to run
11 Graphics Classes
11.1 Overview of graphics classes
11.2 Point and Line
11.3 Lines
11.4 Color
11.5 Line_style
11.6 Polylines
11.7 Closed shapes
11.8 Text
11.9 Mark
11.10 Image
12 Class Design
12.1 Design principles
12.2 Shape
12.3 Base and derived classes
12.4 Other Shape functions
12.5 Benefits of object-oriented programming
17 Essential Operations
17.1 Introduction
17.2 Access to elements
17.3 List initialization
17.4 Copying and moving
17.5 Essential operations
17.6 Other useful operations
17.7 Remaining Vector problems
17.8 Changing size
17.9 Our Vector so far
21 Algorithms
21.1 Standard-library algorithms
21.2 Function objects
21.3 Numerical algorithms
21.4 Copying
21.5 Sorting and searching
Index
Preface
Damn the
torpedoes!
Full speed ahead.
– Admiral
Farragut
Previous Editions
The third edition of Programming: Principles and Practice
Using C++ is about half the size of the second edition.
Students having to carry the book will appreciate the lighter
weight. The reason for the reduced size is simply that more
information about C++ and its standard library is available
on the Web. The essence of the book that is generally used
in a course in programming is in this third edition (“PPP3”),
updated to C++20 plus a bit of C++23. The fourth part of
the previous edition (“PPP2”) was designed to provide extra
information for students to look up when needed and is
available on the Web:
Acknowledgments
Special thanks to the people who reviewed drafts of this
book and suggested many improvements: Clovis L. Tondo,
Jose Daniel Garcia Sanchez, J.C. van Winkel, and Ville
Voutilainen. Also, Ville Voutilainen did the non-trivial
mapping of the GUI/Graphics interface library to Qt, making
it portable to an amazing range of systems.
Also, thanks to the many people who contributed to the
first and second editions of this book. Many of their
comments are reflected in this third edition.
0
eiπ + 1
– Leonhard Euler
The use of CC, AA, and XX, rather than a single token in different colors, is to
help where colors are not easy to distinguish.
In addition, at the end of each chapter we offer some help to solidify what’s
learned:
Review: At the end of each chapter, you’ll find a set of review questions.
They are intended to point you to the key ideas explained in the chapter.
One way to look at the review questions is as a complement to the
exercises: the exercises focus on the practical aspects of programming,
whereas the review questions try to help you articulate the ideas and
concepts. In that, they resemble good interview questions.
Terms: A section at the end of each chapter presents the basic vocabulary
of programming and of C++. If you want to understand what people say
about programming topics and to articulate your own ideas, you should
know what each term means.
Postscript: A paragraph intended to provide some perspective for the
material presented.
In addition, we recommend that you take part in a small project (and more if
time allows for it). A project is intended to produce a complete useful program.
Ideally, a project is done by a small group of people (e.g., three people)
working together (e.g., while progressing through the later chapters of the
book). Most people find such projects the most fun and that they tie
everything together.
CC
Learning involves repetition. Our ideal is to make every important point at
least twice and to reinforce it with exercises.
Program organization
Debugging and testing
Class design
Computation
Function and algorithm design
Graphics (two-dimensional only)
Graphical user interfaces (GUIs)
Files and stream input and output (I/O)
Memory management
Design and programming ideals
The C++ standard library
Software development strategies
To keep the book lighter than the small laptop on which it is written, some
supplementary topics from the second edition are placed on the Web (§0.4.1):
Working our way through the chapters, we cover the programming techniques
called procedural programming (as with the C programming language), data
abstraction, object-oriented programming, and generic programming. The
main topic of this book is programming, that is, the ideals, techniques, and
tools of expressing ideas in code. The C++ programming language is our main
tool, so we describe many of C++’s facilities in some detail. But please
remember that C++ is just a tool, rather than the main topic of this book. This
is “programming using C++,” not “C++ with a bit of programming theory.”
Each topic we address serves at least two purposes: it presents a technique,
concept, or principle and also a practical language or library feature. For
example, we use the interface to a two-dimensional graphics system to
illustrate the use of classes and inheritance. This allows us to be economical
with space (and your time) and also to emphasize that programming is more
than simply slinging code together to get a result as quickly as possible. The
C++ standard library is a major source of such “double duty” examples –
many even do triple duty. For example, we introduce the standard-library
vector, use it to illustrate widely useful design techniques, and show many of
the programming techniques used to implement it. One of our aims is to show
you how major library facilities are implemented and how they map to
hardware. We insist that craftsmen must understand their tools, not just
consider them “magical.”
Some topics will be of greater interest to some programmers than to others.
However, we encourage you not to prejudge your needs (how would you know
what you’ll need in the future?) and at least look at every chapter. If you read
this book as part of a course, your teacher will guide your selection.
CC
We characterize our approach as “depth-first.” It is also “concrete-first” and
“concept-based.” First, we quickly (well, relatively quickly, Chapter 1 to
Chapter 9) assemble a set of skills needed for writing small practical programs.
In doing so, we present a lot of tools and techniques in minimal detail. We
focus on simple concrete code examples because people grasp the concrete
faster than the abstract. That’s simply the way most humans learn. At this
initial stage, you should not expect to understand every little detail. In
particular, you’ll find that trying something slightly different from what just
worked can have “mysterious” effects. Do try, though! Please do the drills and
exercises we provide. Just remember that early on you just don’t have the
concepts and skills to accurately estimate what’s simple and what’s
complicated; expect surprises and learn from them.
AA
We move fast in this initial phase – we want to get you to the point where
you can write interesting programs as fast as possible. Someone will argue,
“We must move slowly and carefully; we must walk before we can run!” But
have you ever watched a baby learning to walk? Babies really do run by
themselves before they learn the finer skills of slow, controlled walking.
Similarly, you will dash ahead, occasionally stumbling, to get a feel of
programming before slowing down to gain the necessary finer control and
understanding. You must run before you can walk!
XX
It is essential that you don’t get stuck in an attempt to learn “everything”
about some language detail or technique. For example, you could memorize all
of C++’s built-in types and all the rules for their use. Of course you could, and
doing so might make you feel knowledgeable. However, it would not make you
a programmer. Skipping details will get you “burned” occasionally for lack of
knowledge, but it is the fastest way to gain the perspective needed to write
good programs. Note that our approach is essentially the one used by children
learning their native language and also the most effective approach used to
learn a foreign language. We encourage you to seek help from teachers,
friends, colleagues, Mentors, etc. on the inevitable occasions when you are
stuck. Be assured that nothing in these early chapters is fundamentally
difficult. However, much will be unfamiliar and might therefore feel difficult at
first.
Later, we build on your initial skills to broaden your base of knowledge. We
use examples and exercises to solidify your understanding, and to provide a
conceptual base for programming.
AA
We place a heavy emphasis on ideals and reasons. You need ideals to guide
you when you look for practical solutions – to know when a solution is good
and principled. You need to understand the reasons behind those ideals to
understand why they should be your ideals, why aiming for them will help you
and the users of your code. Nobody should be satisfied with “because that’s
the way it is” as an explanation. More importantly, an understanding of ideals
and reasons allows you to generalize from what you know to new situations
and to combine ideas and tools in novel ways to address new problems.
Knowing “why” is an essential part of acquiring programming skills.
Conversely, just memorizing lots of poorly understood rules is limiting, a
source of errors, and a massive waste of time. We consider your time precious
and try not to waste it.
Many C++ language-technical details are banished to other sources, mostly
on the Web (§0.4.1). We assume that you have the initiative to search out
information when needed. Use the index and the table of contents. Don’t
forget the online help facilities of your compiler. Remember, though, to
consider every Web resource highly suspect until you have reason to believe
better of it. Many an authoritative-looking Web site is put up by a
programming novice or someone with something to sell. Others are simply
outdated. We provide a collection of links and information on our support Web
site: www.stroustrup.com/programming.xhtml.
Please don’t be too impatient for “realistic” examples. Our ideal example is
the shortest and simplest code that directly illustrates a language facility, a
concept, or a technique. Most real-world examples are far messier than ours,
yet do not consist of more than a combination of what we demonstrate.
Successful commercial programs with hundreds of thousands of lines of code
are based on techniques that we illustrate in a dozen 50-line programs. The
fastest way to understand real-world code is through a good understanding of
the fundamentals.
We do not use “cute examples involving cuddly animals” to illustrate our
points. We assume that you aim to write real programs to be used by real
people, so every example that is not presented as specifically language-
technical is taken from a real-world use. Our basic tone is that of professionals
addressing (future) professionals.
C++ rests on two pillars:
0.3.1 Portability
CC
It is common to write C++ to run on a variety of machines. Major C++
applications run on machines we haven’t ever heard of! We consider the use of
C++ on a variety of machine architectures and operating systems most
important. Essentially every example in this book is not only ISO Standard
C++, but also portable. By portable, we mean that we make no assumptions
about the computer, the operating system, and the compiler beyond that an
up-to-date standard-conforming C++ implementation is available. Unless
specifically stated, the code we present should work on every C++
Another Random Scribd Document
with Unrelated Content
more peculiarly urged to it by the openly expressed veneration or
secret acquiescence of the wisest men. Religious faith, although the
most deeply seated in the breast of any of our sentiments, is,
singular as it may appear, that which we are most eager in
communicating to others. Whatever too has been long suppressed,
breaks forth with redoubled force when the obstacle is removed.
Besides, the religious sentiments of the Jews were not, like those of
the heathens, the speculations of human reason, but truths,
confirmed by the sanction of God; and their zeal in making
proselytes was not the vain desire to swell the numbers of a sect,
but to deliver those who were under the dominion of error.
Myron and our travellers took leave of each other, in the hope of
meeting after a few months. He went through the camp to seek for
company as far as Tyre, and they took the road to Hebron.
From Gaza two roads conduct to Jerusalem. One passes by
Eleutheropolis and the plain of Sephela; the other through the hills
by Hebron. Although the former was the easier and more customary,
Elisama preferred the latter. He had a friend in Hebron, whom he
had not seen for many years, and in whose company he wished to
perform the pilgrimage; and he was desirous of making Helon’s first
entrance into the Land of Promise as solemn and impressive as
possible. By taking the easier road, they must have gone a long way
through the country of the Philistines, and not have been joined by
pilgrims, till they reached Morescheth, and then only in small
numbers. On the other road, they entered immediately on the
Jewish territory, and their way conducted them through scenes
adorned with many an historical remembrance. They had not
proceeded far inward from the sea, in the direction of the river
Besor, when they reached the confines of Judah; they stood at the
foot of its hills, and the land of the heathen lay behind them. Helon
seemed to feel for the first time what home and native country
mean. In Egypt, where he had been born and bred, he had been
conscious of no such feeling; for he had been taught to regard
himself as only a sojourner there. Into this unknown, untrodden
native country he was about to enter, and before he set his foot
upon it, at the first sight of it, the breeze seemed to waft from its
hills a welcome to his home. “Land of my fathers,” he exclaimed,
“Land of Promise, promised to me also from my earliest years!” and
quickened his steps to reach it. He felt the truth of the saying, that
Israel is Israel only in the Holy Land. “Here,” said Elisama, “is the
boundary of Judah.” Helon, unable to speak, threw himself on the
sacred earth, kissed it and watered it with his tears, and Sallu,
letting go the bridles of the camels, did the same. Elisama stood
beside them, and as he stretched his arms over them, and in the
name of the God of Abraham, of Isaac, and of Jacob, blessed their
going out and their coming in, his eyes too overflowed with tears,
and his heart seemed to warm again, as with the renewal of a
youthful love. See, he exclaimed,
At the first crowing of the cock, all was in motion; their host was
making the last arrangements for his departure, the neighbours
entered to announce that the march was about to begin.
Refreshments were offered to the travellers, and especially to
Elisama; but he declared with earnestness, that, even amidst the
idolaters of Egypt, he had scarcely ever allowed himself to taste food
early in a morning, and much less would he do so in Israel, and in
the city of David, and on a pilgrimage to Jerusalem. The commotion
in the street became greater and greater, and it was scarcely dawn,
when they set forth. All the doors of the houses were open, all the
roofs were covered with persons watching their departure. Helon, as
he passed through the streets of Hebron in the ruddy light of the
dawn, and by the palm trees at the gate, was reminded that Hebron
was one of the oldest cities in the world, even older than Zoan in
Egypt;[91] that it had been conquered by Joshua, and given as a
portion to Caleb, the bravest and most faithful of the explorers of
the land;[92] that it had afterwards become a city of the priests, and
had been for seven years the residence of David; that it had been
taken by the Idumeans, and reconquered by the Maccabees,[93] and
once more incorporated with Judah. But when he had passed the
gate, and gained a view of the lovely valley full of vine-yards and
corn-fields, and looked around on the region where patriarchs had
tended their flocks and pitched their tents, and lived in friendly
communion with Jehovah, all the high and enthusiastic feelings of
the preceding day were renewed in his mind. From all the cross-
roads, men, women, and children were streaming towards the
highway to Jerusalem. They had scarcely proceeded a sabbath-day’s
journey, when they saw the grove of terebinths; cymbals, flutes, and
psalms resounded from the midst of it, and hundreds were standing
under the turpentine-tree of Abraham, a tree of immense size and
wide-spreading branches. Helon entered the grove of Mamre with
feelings of religious veneration. Here Abraham had dwelt, here the
angels had appeared to him; beneath these trees Isaac had been
promised, and the rite of circumcision instituted; here Ishmael had
been born, and driven from his father’s tent; and not far off was the
cave of Machpelah, where Abraham and Sarah, Isaac and Rebecca,
Jacob and Leah were buried.[94] And on this spot, consecrated by so
many recollections, the children of these patriarchs were now
preparing to depart, on their festal pilgrimage to Jerusalem. The
occasion and the place seemed to banish from all hearts every other
feeling but piety and good-will; mutual greetings were exchanged;
friends and relations sought each other out, and associated
themselves for the journey, and all faces beamed with joy. “It is time
to set out,” said some of the elders to the judge of Hebron: “already
has the priest asked the watchman on the temple, Does it begin to
be light towards Hebron?” The priests and elders led the procession;
the people followed, and the slaves with the camels were placed in
the midst of them, the Levites had distributed themselves with their
instruments among the multitude, and as they set forward they sung
this psalm:
How am I glad when they say unto me,
I will go up to the house of Jehovah!
My foot hath stood already in thy gates, O Jerusalem!
Jerusalem, thou beautifully built;
Chief city, where all unite together!
Thither do the tribes go up,
The tribes of Jehovah to the festival of remembrance,
To praise the name of Jehovah.
There are the thrones of judgment,
The thrones of the house of David.
Pray for the peace of Jerusalem;
May they prosper that love thee!
Peace be in thy walls,
Prosperity in thy palaces!
For my brethren and companions’ sake,
I wish thee peace!
For the sake of the temple of our God,
I bless thee with good.—Ps. cxxii.
It was a beautiful sight, when the procession came from the plain
among the hills. The rocky walls, between which their path
sometimes lay, re-echoed with their songs. Helon withdrew a little
from the line, to an eminence which commanded a view in both
directions, and could see the train, covering both the ascent and the
descent of the hill, spreading over the plain, and winding like a
wreath around the hill beyond.
In every town and village to which they came, they were received
with shouts of joy. Before the doors of the houses stood tables with
dates, honey, and bread. New crowds of persons, dressed in their
holyday attire, were waiting at the junction of the roads, in the
fields, and at the entrance of the towns, and joined themselves to
the long procession. Here and there before the houses, in the fields
or in the vineyards, stood an unclean person, or a woman, or a
child, who had been compelled to remain at home, and who replied
with tears to the salutation of the passing multitude. It seemed as if
the people carried all joy with them from the country to Jerusalem,
and only sorrow was left for those who remained behind. Before a
house in Bethshur, stood a fine boy of ten years old. Tears streamed
from his large dark eyes, and the open features of his noble
countenance had an expression of profound grief. His mother was
endeavouring to comfort him, and to lead him back into the court,
assuring him that his father would take him the next time. But the
boy listened neither to her consolations nor her promises, and
continued to exclaim, “O father, father, let me go to the temple! I
know all the psalms by heart.” He stretched out his arms to the
passers-by in earnest entreaty, and happening to see among them a
man of the neighbourhood whom he knew, he flew to him, and
clinging to his girdle and his upper garment, besought him with tears
to take him with him, till the man, moved by his earnestness, asked
his mother to allow him to go, promising to take care of him till he
should find out his father.
“And this,” said Helon, “is the object of children’s longing in Israel;
so early does the desire of keeping the festival display itself! Brought
up in Palestine, he felt it would have been with him exactly as with
the child.”
They now passed through a wood and then descended a lofty hill
whose slope was wholly covered with vines. In the valley before
them lay the pools of Solomon. They slackened their pace, and the
following psalm was sung:
How lovely are thy tabernacles, Lord of hosts!
My soul longeth and fainteth for the courts of the Lord,
My heart and my flesh cry out for the living God.
As the bird that findeth her house,
As the swallow, a nest for her young,
So I thine altars, O Lord of hosts,
My king and my God!
Blessed are they that dwell in thy house;
They are still praising Thee;
Blessed is the man who placeth his confidence in Thee
And thinketh of the way to Jerusalem!
Should they pass through the valley of sorrow
They find it full of springs.
Blessings be on him who goeth before them,
They increase in strength as they go on,
Till they appear before God in Zion.
O Lord of hosts, hear my prayer!
Give ear, O God of Jacob!
O God, our shield, look down,
Behold the face of thine anointed!
A day in thy courts is better than a thousand.
I had rather be a doorkeeper in the house of God
Than dwell in the tents of wickedness.
For Jehovah our God is a sun and shield;
Jehovah giveth grace and glory,
No good thing will he withhold from them that walk uprightly.
O Lord of hosts,
Blessed is the man that trusteth in Thee!—Ps. lxxxiv.
They were now arrived at the pools of Solomon, into which the
brook Etham was received, and which had formerly supplied
Jerusalem with water, by means of a costly aqueduct. The three
pools lay on different levels, one below another, on a sloping ground.
Around each was a double row of noble palms, in which the whole of
this spot abounded. Here, beside the springs and in the refreshing
shade of the trees, the pilgrims encamped to rest at noon. They had
accomplished twenty-six sabbath-days’ journies of their march and
ten yet remained.
This aqueduct of Solomon’s was a stupendous work. The fountain
of Etham, whose waters the pools received, was about one hundred
and fifty paces above them. The pools were of an oblong form, the
highest one hundred and sixty, the second two hundred, the lowest
two hundred and twenty paces in length, and all ninety paces in
breadth. The celebrated gardens of Solomon lay beneath these
reservoirs, and were a work equally admirable in their kind. They lay
in a rocky valley, enclosed by high hills, and were five hundred paces
long and two hundred broad. A solitude, which had nothing in it wild
or savage, made them a delightful retreat. In the stillness of this
glen, amidst fruit-trees of every variety, the king might find a noble
recreation from the cares of royalty. From these extraordinary
gardens Solomon derived his imagery, when he said, “A garden
enclosed is my sister, my spouse;”[98] and when he speaks in the
same passage of a spring shut up, and a fountain sealed, we are
reminded of the fountain of Etham, which Solomon is said to have
sealed with his own signet ring. Both may serve to explain the words
of the Preacher. “I made me great works, I builded me houses, I
planted me vineyards; I made me gardens and orchards, and I
planted trees in them of all kind of fruits; I made me pools of water
to water therewith the wood of green trees.”[99] Both the reservoirs
and the aqueduct appeared, by the solidity of their construction, to
have been designed to last for ever, and were worthy of the king by
whom they were made, and of his times, of which the Book of
Chronicles declares, that “Silver was in Jerusalem like stones.”[100]
Our travellers blessed his memory, as they drank, beneath the shade
of the palms, the refreshing draught of the cool rock water. It was
just mid-day, the heat of the sun was intense, and all longed for
repose and coolness.
After a short rest the sacks and wine-skins were unpacked from
the camels, while others produced their humble stores from their
mantles or their bosoms. The upper garments were spread for
carpets, on which they lay for rest, or crouched to eat. Now you
might see that these pilgrims were a band of brothers. It is true, the
very poorest had brought something with him. For weeks before,
ever since the feast of tabernacles, they had denied themselves, in
order to save something for this festival; and on this day at least the
command of Moses might appear to have been literally fulfilled,
“There shall be no beggar among you.” But besides this the rich had
provided for the poor a supply of those things which on ordinary
occasions they were not able to procure themselves. Some sent to
the old men a cup of generous wine, or regaled the children with
confectionary and fruits. From Tekoah, the birthplace of the prophet
Amos, which was not far off, came asses loaded with the celebrated
honey of Tekoah; and from Beth-Cherem, celebrated for its wines,
others with large and sweet raisins. From the cheerful mirth which
pervaded the whole assembly, and the delightful coolness of the
water and the trees, they seemed more like a company celebrating,
in a fine evening, the festival of the new moon, than a caravan
halting at mid-day. No one felt the heat or complained of weariness,
except a few aged and weakly persons, who indulged themselves in
a short rest.
Behind a hill the walls of Tekoah were discerned in the distance,
and beyond it the desert of Tekoah, the free pasture of the bees, for
whose honey the town was celebrated. “Does not this scene remind
thee of the prophet-herdsman of Tekoah?” said Elisama to Helon.
“How should it not,” replied Helon, “when I see his prophecy almost
fulfilled before my eyes?”[101]
In that day will I raise up the fallen tabernacle of David,
And close up its breaches, and raise up its ruins,
And build it afresh as in the days of old,
That they may conquer the remnant of Edom,
And of all nations whom I will consecrate to myself,
Saith Jehovah who doeth this.
Behold the day cometh, saith Jehovah,
When the plowman shall overtake the reaper,
And the treader of grapes him that soweth seed.
And the mountains shall drop sweet wine,
And all the hills shall stream.
I will bring back the captivity of my people Israel
And they shall build the desolate cities,
And plant vineyards and drink the wine thereof,
They shall make gardens and eat the fruit of them,
And I will plant them firmly in their land,
And they shall no more be plucked out of their land which I have
given them,
Saith the Lord thy God.
They waited another hour in this pleasant valley, till the great heat
of noon was moderated. During this time some youths came to
Helon, and said to him, “Though you speak our language you are
not a youth of Judah, your turban betrays you.” Helon informed
them that he was an Aramæan Jew, a native of Alexandria indeed,
but one who had chosen Jerusalem, in preference to Leontopolis.
They acknowledged him with joy as one of themselves, and invited
him to accompany them in a walk around the encampment. Helon
gladly accepted the offer.
What a multitude of interesting groups presented themselves on
every side, as they wandered from one palm tree to another! Every
party as they passed offered them wine, mead, honey, dates and the
like, and greeted them with friendly words. Boys had insinuated
themselves among the circles of the men, and listened, with fixed
eyes and open mouth, to every word which they uttered respecting
Jerusalem and the festival. The boy whom Helon had seen weeping
so bitterly before the solitary house had found out his father, was
lying in his lap and repeating to him the psalms which he had learnt.
A group of maidens were listening to a description of the
magnificent vestments of the high-priest. They past by a company of
men, who were speaking of the heroic deeds of Hyrcanus and the
Maccabees, and rejoicing that Edom and Samaria had been made
subject by him to Israel. One feeling of joy pervaded all bosoms, but
it expressed itself in various ways, according to the age or sex of
each.
One group rivetted the attention of Helon so long, that he did not
leave them till it was near the time of departure. Under almost the
furthest palm trees sat seven robust young men, with an equal
number of women and several children. “This is Mardochai of Ziph,
with his children and children’s children,” said one of the youths who
accompanied Helon. They approached him, took him by the hand,
and congratulated him upon being able to go up to the feast, with
such a train of his descendents. “Yes,” exclaimed the old man, while
tears trembled in his dark eyes, “Jehovah hath abundantly blessed
me. I see my offspring, like the sand on the seashore—children and
children’s children, to the number of fifty souls!”
This aged pair had not for several years gone up to the festival:
but their children had now persuaded them to appear once more
before Jehovah. They had been the last in the procession, and their
sons and daughters had been obliged almost to carry them in their
arms—a burthen which they had joyfully sustained—for they had
refused either to ride or be conveyed in a carriage. “Where could a
psalm of degrees be more in its place?” said a lively youth of the
company. At the word several of them ran to fetch their musical
instruments, and standing around the deeply moved old man, they
sung the following psalm:
Blessed is every one that feareth Jehovah,
That walketh in his ways.
For thou shalt eat of the labour of thy hands:
Happy art thou, and it is well with thee!
Thy wife is a fruitful vine, by the walls of thine house,
Thy children, like olive plants around thy table.
Behold, thus shall the man be blessed that feareth Jehovah:
Jehovah will bless thee out of Zion.
Thou shalt see the prosperity of Jerusalem thine whole life long,
Yea, thou shalt see thy children’s children.
Peace be upon Israel!—Ps. cxxviii.
During this time others had come up, and soon the news was
spread through the whole assemblage, that Mardochai of Ziph was
once more among them; and nearly all the pilgrims came and
formed a circle about him. The judges and elders of Hebron were
among them, and all greeted the venerable pair and wished them
peace.
“Ye shall lead the procession!” said an elder of Hebron! “The place
of honour belongs to you. The pilgrims of Hebron cannot advance
with any blessing better or more rare.”
The sons took their father, the daughters their mother, in their
arms, the priests and elders followed, and the march began again to
complete the ten sabbath-days’ journies which they were still distant
from Jerusalem.
Far from the expressions of joy being exhausted by all the songs
and acclamations of the morning, they seemed only to be beginning,
when they set forward again. From the pools of Solomon they took
their way through the hills to Bethlehem. The cymbals, cornets, and
timbrels of the Levites struck up their music again, and many a soul-
inspiring psalm was heard from the lips of an assemblage now
swollen to several thousand persons. In a pilgrimage to the temple,
could he be forgotten, whose pious heart first conceived the wish to
build a house for Jehovah? The warrior-bard was commemorated in
the following psalm:
Lord remember David!
All his afflictions.
How he sware unto the Lord
And vowed unto the Mighty One of Jacob;
Surely I will not go into mine house,
Nor go up into my bed;
I will not give sleep to mine eyes,
Nor slumber to mine eyelids,
Until I find out a place for the Lord,
A habitation for the Mighty One of Jacob.
Lo, we heard of it at Ephratah,
We found it in the fields of Jaar:
Let us go into his tabernacle,
Let us worship at his footstool!—Ps. cxxxii.
Expectation had reached the highest pitch. The last strophes were
not completely sung; many were already silent, eagerly watching for
the first sight of Jerusalem. All eyes were turned towards the north;
a faint murmur spread from rank to rank among the people, only
those who had been at the festival before continued the psalm, and
these solitary scattered voices formed a solemn contrast with the
silence of the rest of the multitude. Helon’s heart was in his eye, and
he could scarcely draw his breath. When the psalm was concluded,
the instruments prolonged the sound for a moment, and then all
that mighty multitude, so lately jubilant, was still as death.
All at once the foremost ranks exclaimed, Jerusalem, Jerusalem!
Jerusalem, Jerusalem! resounded through the valley of Rephaim.
“Jerusalem, thou city built on high, we wish thee peace!” The
children dragged their parents forward with them, and all hands
were lifted up to bless.
The high white walls of the Holy City cast a gleam along the
valley: Zion arose with its palaces, and from Moriah the smoke of the
offering was ascending to heaven. It was the hour of the evening
sacrifice. Scarcely had the multitude recovered a little, when they
began to greet the temple and the priests:
They had now reached the termination of their march. The day of
preparation was beginning; the following evening was the Passover.
From the gates of Jerusalem came forth, in every direction, the
pilgrims who had already arrived and the inhabitants of the city, to
welcome the new comers from Hebron and from Libna. The
venerable pair, Mardochai of Ziph and his wife, who were still borne
in front, received the blessings of all who met them.
Close by the gate, some one from behind laid hold of Elisama; “Art
thou Elisama of Alexandria?” Elisama turned round and recognised
Iddo, an old and faithful friend of his family. The old men met with
inexpressible delight, and Elisama presented Helon to Iddo. The
pilgrims had now reached the city, and were dispersing in different
directions to their respective quarters. Iddo conducted the strangers
through the Water-gate to his house on the open place.
CHAPTER III.
THE DAY OF PREPARATION FOR THE PASSOVER.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com