(Ebook) Modern C for Absolute Beginners: A Friendly Introduction to the C Programming Language by Dmitrović, Slobodan ISBN 9781484266434, 1484266439 all chapter instant download
(Ebook) Modern C for Absolute Beginners: A Friendly Introduction to the C Programming Language by Dmitrović, Slobodan ISBN 9781484266434, 1484266439 all chapter instant download
com
OR CLICK HERE
DOWLOAD EBOOK
https://ebooknice.com/product/modern-c-for-absolute-beginners-36253462
ebooknice.com
https://ebooknice.com/product/modern-c-for-absolute-beginners-a-friendly-
introduction-to-the-c-programming-language-23942578
ebooknice.com
https://ebooknice.com/product/modern-c-for-absolute-beginners-a-friendly-
introduction-to-the-c-programming-language-56083684
ebooknice.com
https://ebooknice.com/product/modern-c-for-absolute-beginners-a-friendly-
introduction-to-c-programming-language-and-c-11-to-c-20-standards-11279556
ebooknice.com
(Ebook) Modern C++ for Absolute Beginners: A Friendly Introduction to the C++
Programming Language and C++11 to C++23 Standards, 2nd Edition by Slobodan Dmitrovi■
ISBN 9781484292730, 1484292731
https://ebooknice.com/product/modern-c-for-absolute-beginners-a-friendly-
introduction-to-the-c-programming-language-and-c-11-to-c-23-standards-2nd-
edition-48278302
ebooknice.com
ebooknice.com
https://ebooknice.com/product/modern-c-for-absolute-beginners-22736378
ebooknice.com
https://ebooknice.com/product/modern-c-for-absolute-beginners-23198666
ebooknice.com
https://ebooknice.com/product/modern-c-for-absolute-beginners-a-friendly-
introduction-56093266
ebooknice.com
Slobodan Dmitrović
The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.
1. Introduction
Slobodan Dmitrović 1
(1) Belgrade, Serbia
1.1 What Is C?
C is a programming language, a general-purpose, procedural, compiled
programming language. C language was created by Dennis Ritchie in
the late 1960s and early 1970s. The C program is a collection of C
source code spread across one or more source and header files. Source
files by convention have the .c extension, and header files have the .h
extension. Source and header files are plain text files that contain some
C code.
1.3 C Compilers
To compile and run a C program, we need a C compiler. A compiler
compiles a C program and turns the source code into an object file. The
linker then links the object files together and produces an executable
file or a library, depending on our intention. For the most part, we say
we compile the program and assume the compilation process results in
an executable file that we can run. At the time of writing, some of the
more popular C compilers are:
gcc – as part of the GCC toolchain
Clang – as part of the LLVM toolchain
Visual C/C++ compiler – as part of the Visual Studio IDE
MinGW – a Windows port of the GCC
1.3.1.1 On Linux
To install a GCC compiler on Linux , open a terminal window and type:
#include <stdio.h>
int main(void)
{
printf("Hello World!\n");
}
Let us save the file as a source.c. To compile this program using GCC,
we type:
gcc source.c
./a.out
Note For now, let us take the source code inside the source.c file for
granted. The example is for demonstration purposes. We will get into
detailed code explanation and analysis in later chapters.
clang source.c
Same as before, the compiler compiles the source file and produces
an executable file with the default name of a.out. To run this file, we
type:
./a.out
./myexe
If using Clang:
1.3.1.2 On Windows
On Windows , we can install Visual Studio. Choose the Create a new
project option, make sure the C++ option is selected, choose Empty
Project, and click Next. Modify the project and solution names or leave
the default values, and click Create. We have now created an empty
Visual Studio project. In the Solution Explorer window, right-click on a
project name and choose Add – New Item…. Ensure the Visual C++ tab is
selected, click on the C++ File (.cpp) option, modify the file name to
source.c, and click Add. We can use a different file name, but the
extension should be .c. Double-click on the source.c file, and paste our
previous Hello World source code into it. Press F5 to run the program.
To compile for the C11 standard, use the /std:c11 compiler switch.
To compile for the C17 standard, use the /std:c17 compiler switch.
Alternatively, install the MinGW (Minimalist GNU for Windows) and
use the compiler in a console window, the same way we would on
Linux.
So far, we have learned how to set up the programming
environments on Linux and Windows and compile and run our C
programs. We are now ready to start with the C theory and examples.
1.4 C Standards
The C programming language is a standardized language. There were
different C standards throughout history. The first notable standard
was the ANSI C, and now it is the ISO standard known as the
ISO/IEC:9989 standard. Some of the C standards throughout the years:
ANSI C Standard (referred to as ANSI C and C89)
C90 (official name: ISO/IEC 9899:1990; it is the ANSI C Standard
adopted by ISO; the C89 and C90 are the same things)
C99 (ISO/IEC 9899:1999)
C11 (ISO/IEC 9899:2011)
C17 (ISO/IEC 9899:2018)
The upcoming standard informally named C2x
Each of the standards introduces new features and changes to the
language and the standard library. Everything starting with C11 is often
referred to as the modern C. And modern C is what we will be teaching
in this book. Let us get started!
© Slobodan Dmitrović 2021
S. Dmitrović, Modern C for Absolute Beginners
https://doi.org/10.1007/978-1-4842-6643-4_2
This section describes the main program entry point, how to work with
comments, and how to write a simple “Hello World” program.
int main(void) {}
The function main is of type int, which stands for integer, followed
by the reserved name main, followed by an empty list of parameters
inside the parentheses (void). The name void inside the
parentheses means the function accepts no parameters. Following is
the function body marked with braces {}. The opening brace { marks
the beginning of a code block, and the closing brace } marks the end of
the code block. We write our C code inside the code block marked by
these braces. The code we write there executes when we start our
executable file.
For readability reasons, we can put braces on new lines:
int main(void)
{
}
We can keep the opening brace on the same line with the main
function definition and have the ending brace on a new line:
int main(void) {
int main(void)
{
return 0;
}
int main(void)
{
}
We often see the use of the following, also valid main signature:
int main()
{
return 0;
}
int main(void)
{
2.2 Comments
We can have comments in our C program. A comment is a text that is
useful to us but is ignored by the compiler. Comments are used to
document the source code, serve as notes, or comment-out the part of
the source code.
A C-style comment starts with /* characters and ends with */
characters. The comment text is placed between these characters.
Example:
int main(void)
{
/* This is a comment in C */
}
The comment can also be a multiline comment:
int main(void)
{
/* This is a
multi-line comment in C */
}
int main(void)
{
// This is a comment
}
int main(void)
{
// This is a comment
// This is another comment
}
#include <stdio.h>
Another Random Scribd Document
with Unrelated Content
CHAPTER XXIX
It is well known that the Patriarch Abraham was brought up in the
religion and the opinion of the Sabeans, that there is no divine being
except the stars. I will tell you in this chapter their works which are
at present extant in Arabic translations, and also in their ancient
chronicles; and I will show you their opinion and their practice
according to these books. You will then see clearly that they consider
the stars as deities, and the sun as the chief deity. They believe that
all the seven stars are gods, but the two luminaries are greater than
all the rest. They say distinctly that the sun governs the world, both
that which is above and that which is below; these are exactly their
expressions. In these books, and in their chronicles, the history of
Abraham our father is given in the following manner. Abraham was
brought up in Kutha; when he differed from the people and declared
that there is a Maker besides the sun, they raised certain objections,
and mentioned in their arguments the evident and manifest action of
the sun in the Universe. “You are right,” said Abraham; “[the sun
acts in the same manner] as ‘the axe in the hand of him that hews
with it.’ ” Then some of his arguments against his opponents are
mentioned. In short, the king put him in prison; but he continued
many days, while in prison, to argue against them. At last the king
was afraid that Abraham might corrupt the kingdom, and turn the
people away from their religion; he therefore expelled Abraham into
Syria, after having deprived him of all his property.
This is their account which you find clearly stated in the book called
The Nabatean Agriculture. Nothing is said there of the account given
in our trustworthy books, nor do they mention what he learnt by
way of prophecy; for they refused to believe him, because he
attacked their evil doctrine. I do not doubt that when he attacked
the doctrine of all his fellow-men, he was cursed, despised, and
scorned by these people who adhered to their erroneous opinions.
When he submitted to this treatment for the sake of God, as ought
to be done for the sake of His glory, God said to him, “And I will
bless them that bless thee, and curse them that curse thee” (Gen.
xii. 3). The result of the course which Abraham took, is the fact that
most people, as we see at present, agree in praising him, and being
proud of him; so that even those who are not his descendants call
themselves by his name. No one opposes him, and no one ignores
his merits, except some ignoble remnants of the nations left in the
remote corners of the earth, like the savage Turks in the extreme
North, and the Indians in the extreme South. These are remnants of
the Sabeans, who once filled the earth. [316]Those who were able to
think, and were philosophers in those days, could only raise
themselves to the idea that God is the spirit of the spheres; the
spheres with their stars being the body, and God the spirit. Abu-becr
al-Zaig mentions this in his Commentary on the book of Physics.
All the Sabeans thus believed in the eternity of the Universe, the
heavens being in their opinion God. Adam was in their belief a
human being born from male and female, like the rest of mankind;
he was only distinguished from his fellow-men by being a prophet
sent by the moon; he accordingly called men to the worship of the
moon, and he wrote several works on agriculture. The Sabeans
further relate that Noah was an agriculturist, and that he was not
pleased with the worship of idols; they blame him for that, and say
that he did not worship any image. In their writings we meet even
with the statement that Noah was rebuked and imprisoned because
he worshipped God, and with many other accounts about him. The
Sabeans contend that Seth differed from his father Adam, as regards
the worship of the moon. They manufactured ridiculous stories,
which prove that their authors were very deficient in knowledge,
that they were by no means philosophers, but on the contrary were
extremely ignorant persons. Adam, they say, left the torrid zone near
India and entered the region of Babylon, bringing with him
wonderful things, such as a golden tree, that was growing, and had
leaves and branches; a stone tree of the same kind, and a fresh leaf
of a tree proof against fire. He related that there was a tree which
could shelter ten thousand men, although it had only the height of a
man; two leaves he brought with him, each of which was sufficient
to cover two men. Of these stories the Sabeans have a wonderful
abundance. I am surprised that persons who think that the Universe
is eternal, can yet believe in these things which nature cannot
produce, as is known to every student of Natural Science. They only
mention Adam, and relate the above stories about him, in order to
support their theory of the Eternity of the Universe; from this theory
they then derive the doctrine that the stars and the spheres are
deities. When [Abraham] the “Pillar of the World” appeared, he
became convinced that there is a spiritual Divine Being, which is not
a body, nor a force residing in a body, but is the author of the
spheres and the stars; and he saw the absurdity of the tales in
which he had been brought up. He therefore began to attack the
belief of the Sabeans, to expose the falsehood of their opinions, and
to proclaim publicly in opposition to them, “the name of the Lord,
the God of the Universe” (Gen. xxi. 33), which proclamation included
at the same time the Existence of God, and the Creation of the
Universe by God.
Among other fables we read there that the plant althea, one of the
Asherot, which they made, as I told you, stood in Nineveh twelve
thousand years. This tree had once a quarrel with the mandragora,
which wanted to take the place of the former. The person who had
been inspired by this tree ceased to receive inspiration; when after
some time the prophetical power had returned to him, he was told
by the althea that the latter had been engaged in a dispute with the
mandragora. He was then commanded to write to the magicians that
they should decide whether the althea or the mandragora was better
and more effective in witchcraft. It is a long story, and you may
learn from it, when you read it, the opinions and the wisdom of the
men of that time. Such were in those days of darkness the wise men
of Babel, to whom reference is made in Scripture, and such were the
beliefs in which they were trained. And were it not that the theory of
the Existence [319]of God is at present generally accepted, our days
would now have been darker than those days, though in other
respects. I return now to my subject.
In that book the following story is also related: One of the idolatrous
prophets, named Tammuz, called upon the king to worship the
seven planets and the twelve constellations of the Zodiac;
whereupon the king killed him in a dreadful manner. The night of his
death the images from all parts of the land came together in the
temple of Babylon which was devoted to the image of the Sun, the
great golden image. This image, which was suspended between
heaven and earth, came down into the midst of the temple, and
surrounded by all other images commenced to mourn for Tammuz,
and to relate what had befallen him. All other images cried and
mourned the whole night; at dawn they flew away and returned to
their temples in every corner of the earth. Hence the regular custom
arose for the women to weep, lament, mourn, and cry for Tammuz
on the first day of the month of Tammuz.
They describe how temples are built and images of metal and stone
placed in them, altars erected and sacrifices and various kinds of
food are offered thereon, festivals celebrated, meetings held in the
temples for prayer and other kinds of service; how they select
certain very distinguished places and call them temples of
Intellectual Images (or Forms); how they make images “on the high
mountains” (Deut. xii. 2), rear asherot, erect pillars, and do many
other things which you can learn from the books mentioned by us.
The knowledge of these theories and practices is of great
importance in explaining the reasons of the precepts. For it is the
principal object of the Law and the axis round which it turns, to blot
out these opinions from man’s heart and make the existence of
idolatry impossible. As regards the former Scripture says: “Lest your
heart be persuaded,” etc. (Deut. xi. 16), “whose heart turneth away
to-day,” etc. (ibid. xxix. 17). The actual abolition of idolatry is
expressed in the following passage: “Ye shall destroy their altars,
and burn their groves in fire” (Deut. vii. 5), “and ye shall destroy
their name,” etc. (xii. 3). These two things are frequently repeated;
they form the principal and first object of the whole Law, as our
Sages distinctly told us in their traditional explanation of the words
“all that God commanded you by the hand of Moses” (Num. xv. 23);
for they say, “Hence we learn that those who follow idolatry deny as
it were their adhesion to the whole Law, and those who reject
idolatry follow as it were the whole Law.” (B. T. Kidd, 40a.) Note it.
[Contents]
CHAPTER XXX
On examining these old and foolish doctrines we find that it was
most generally believed by the people that by the worship of stars
the earth will become inhabited, and the ground fertilized. The wise,
pious, and sin-fearing men among them reproved the people and
taught them that agriculture, on which the preservation of mankind
depended, would become perfect and satisfy man’s wishes, when he
worshipped the sun and the stars. If man provoked these beings by
his rebelliousness, the towns would become empty and waste. In
the above-named books it is stated that Mars was angry with [lands,
that form now] deserts and wastes, and in consequence of that
anger they were deprived of water and trees, and have become the
habitation of demons. Tillers of the ground and husbandmen are
praised in those books, because they are engaged with the
cultivation of the land in accordance with the will and desire of the
stars. The idolaters also held cattle in esteem on account of their use
in agriculture, and went even so far as to say, that it is not allowed
to slay them, because they combine in themselves strength and
willingness to do the work of man in tilling the ground. The oxen,
notwithstanding their great strength, do this, and submit to man,
because it is the will of God that they should be employed in
agriculture. When these views became generally known, idolatry was
connected with agriculture, because the latter is indispensable for
the maintenance of man, and of most animals. The idolatrous priests
then preached to the people who met in the temples, and taught
them that by certain religious acts, rain would come down, the trees
of the field would yield their fruit, and the land would be fertile and
inhabited. See what is said in the [321]Nabatean Agriculture in the
chapter on vineyards. The following words of the Sabeans are
quoted there: “All ancient wise men advised, and prophets likewise
commanded and enjoined to play before the images on certain
instruments during the festivals. They also said—and what they said
is true—that the deities are pleased with it, and reward those who
do it. They promise, indeed, very great reward for these things; e.g.,
length of life, protection from illness, exemption from great bodily
deformities, plenty of the produce of the earth, and of the fruits of
the trees.” These are the words of the Sabeans. When these ideas
spread, and were considered as true, God, in His great mercy for us,
intended to remove this error from our minds, and to protect our
bodies from trouble; and therefore desired us to discontinue the
practice of these useless actions. He gave us His Law through
Moses, our teacher, who told us in the name of God, that the
worship of stars and other corporeal beings would effect that rain
would cease, the land be waste, and would not produce anything,
and the fruit of the trees would wither; calamities would befall the
people, their bodies would be deformed, and life would be
shortened. These are the contents of “the words of the covenant
which God made” (Deut. xxviii. 6–9). It is frequently expressed in all
parts of Scripture, that the worship of the stars would be followed by
absence of rain, devastation of the land, bad times, diseases, and
shortness of life. But abandonment of that worship, and the return
to the service of God, would be the cause of the presence of rain,
fertility of the ground, good times, health and length of life. Thus
Scripture teaches, in order that man should abandon idolatry, the
reverse of that which idolatrous priests preached to the people, for,
as has been shown by us, the principal object of the Law is to
remove this doctrine, and to destroy its traces.
[Contents]
CHAPTER XXXI
There are persons who find it difficult to give a reason for any of the
commandments, and consider it right to assume that the
commandments and prohibitions have no rational basis whatever.
They are led to adopt this theory by a certain disease in their soul,
the existence of which they perceive, but which they are unable to
discuss or to describe. For they imagine that these precepts, if they
were useful in any respect, and were commanded because of their
usefulness, would seem to originate in the thought and reason of
some intelligent being. But as things which are not objects of reason
and serve no purpose, they would undoubtedly be attributed to God,
because no thought of man could have produced them. According to
the theory of those weak-minded persons, man is more perfect than
his Creator. For what man says or does has a certain object, whilst
the actions of God are different; He commands us to do what is of
no use to us, and forbids us to do what is harmless. Far be this! On
the contrary, the sole object of the Law is to benefit us. Thus we
explained the Scriptural passage, “for our good always, that He
might preserve us alive, as it is this day” (Deut. vi. 24). Again,
“which shall hear all those statutes (ḥuḳḳim), and say, surely this
great nation is a wise and understanding people” (ibid. iv. 6). He
thus says that even every one of these “statutes” convinces all
nations of the wisdom and understanding it includes. But if no
reason could be found for [322]these statutes, if they produced no
advantage and removed no evil, why then should he who believes in
them and follows them be wise, reasonable, and so excellent as to
raise the admiration of all nations? But the truth is undoubtedly as
we have said, that every one of the six hundred and thirteen
precepts serves to inculcate some truth, to remove some erroneous
opinion, to establish proper relations in society, to diminish evil, to
train in good manners, or to warn against bad habits. All this
depends on three things: opinions, morals, and social conduct. We
do not count words, because precepts, whether positive or negative,
if they relate to speech, belong to those precepts which regulate our
social conduct, or to those which spread truth, or to those which
teach morals. Thus these three principles suffice for assigning a
reason for every one of the Divine commandments.
[Contents]
CHAPTER XXXII
On considering the Divine acts, or the processes of Nature, we get
an insight into the prudence and wisdom of God as displayed in the
creation of animals, with the gradual development of the movements
of their limbs and the relative positions of the latter, and we perceive
also His wisdom and plan in the successive and gradual development
of the whole condition of each individual. The gradual development
of the animals’ movements and the relative position of the limbs may
be illustrated by the brain. The front part is very soft, the back part
is a little hard, the spinal marrow is still harder, and the farther it
extends the harder it becomes. The nerves are the organs of
sensation and motion. Some nerves are only required for sensation,
or for slight movements, as, e.g., the movement of the eyelids or of
the jaws; these nerves originate in the brain. The nerves which are
required for the movements of the limbs come from the spinal
marrow. But nerves, even those that come directly from the spinal
cord, are too soft to set the joints in motion; therefore God made
the following arrangement: the nerves branch out into fibres which
are covered with flesh, and become muscles; the nerves that come
forth at the extremities of the muscles and have already commenced
to harden, and to combine with hard pieces of ligaments, are the
sinews which are joined and attached to the limbs. By this gradual
development the nerves are enabled to set the limbs in motion. I
quote this one instance because it is the most evident of the
wonders described in the book On the use of the limbs; but the use
of the limbs is clearly perceived by all who examine them with a
sharp eye. In a similar manner did God provide for each individual
animal of the class of mammalia. When such an animal is born it is
extremely tender, and cannot be fed with dry food. Therefore
breasts were provided which yield milk, and the young can be fed
with moist food which corresponds to the condition of the limbs of
the animal, until the latter have gradually become dry and hard.
Many precepts in our Law are the result of a similar course adopted
by the same Supreme Being. It is, namely, impossible to go suddenly
from one extreme to the other; it is therefore according to the
nature of man impossible for him suddenly to discontinue everything
to which he has been accustomed. Now God sent Moses to make
[the Israelites] a kingdom of priests and a holy nation (Exod. xix. 6)
by means of the knowledge of God. [323]Comp. “Unto thee it was
showed that thou mightest know that the Lord is God” (Deut. iv.
35); “Know therefore this day, and consider it in thine heart, that the
Lord is God” (ibid. v. 39). The Israelites were commanded to devote
themselves to His service; comp. “and to serve him with all your
heart” (ibid. xi. 13); “and you shall serve the Lord your God” (Exod.
xxiii. 25); “and ye shall serve him” (Deut. xiii. 5). But the custom
which was in those days general among all men, and the general
mode of worship in which the Israelites were brought up, consisted
in sacrificing animals in those temples which contained certain
images, to bow down to those images, and to burn incense before
them; religious and ascetic persons were in those days the persons
that were devoted to the service in the temples erected to the stars,
as has been explained by us. It was in accordance with the wisdom
and plan of God, as displayed in the whole Creation, that He did not
command us to give up and to discontinue all these manners of
service; for to obey such a commandment it would have been
contrary to the nature of man, who generally cleaves to that to
which he is used; it would in those days have made the same
impression as a prophet would make at present if he called us to the
service of God and told us in His name, that we should not pray to
Him, not fast, not seek His help in time of trouble; that we should
serve Him in thought, and not by any action. For this reason God
allowed these kinds of service to continue; He transferred to His
service that which had formerly served as a worship of created
beings, and of things imaginary and unreal, and commanded us to
serve Him in the same manner; viz., to build unto Him a temple;
comp. “And they shall make unto me a sanctuary” (Exod. xxv. 8); to
have the altar erected to His name; comp. “An altar of earth thou
shalt make unto me” (ibid. xx. 21); to offer the sacrifices to Him;
comp. “If any man of you bring an offering unto the Lord” (Lev. i. 2),
to bow down to Him and to burn incense before Him. He has
forbidden to do any of these things to any other being; comp. “He
who sacrificeth unto any God, save the Lord only, he shall be utterly
destroyed” (Exod. xxii. 19); “For thou shalt bow down to no other
God” (ibid. xxxiv. 14). He selected priests for the service in the
temple; comp. “And they shall minister unto me in the priest’s office”
(ibid. xxviii. 41). He made it obligatory that certain gifts, called the
gifts of the Levites and the priests, should be assigned to them for
their maintenance while they are engaged in the service of the
temple and its sacrifices. By this Divine plan it was effected that the
traces of idolatry were blotted out, and the truly great principle of
our faith, the Existence and Unity of God, was firmly established;
this result was thus obtained without deterring or confusing the
minds of the people by the abolition of the service to which they
were accustomed and which alone was familiar to them. I know that
you will at first thought reject this idea and find it strange; you will
put the following question to me in your heart: How can we suppose
that Divine commandments, prohibitions, and important acts, which
are fully explained, and for which certain seasons are fixed, should
not have been commanded for their own sake, but only for the sake
of some other thing; as if they were only the means which He
employed for His primary object? What prevented Him from making
His primary object a direct commandment to us, and to give us the
capacity of obeying it? Those precepts which in your opinion are only
the means and not the [324]object would then have been
unnecessary. Hear my answer, which will cure your heart of this
disease and will show you the truth of that which I have pointed out
to you. There occurs in the Law a passage which contains exactly
the same idea; it is the following: “God led them not through the
way of the land of the Philistines, although that was near; for God
said, Lest peradventure the people repent when they see war, and
they return to Egypt; but God led the people about, through the way
of the wilderness of the Red Sea,” etc. (Exod. xiii. 17). Here God led
the people about, away from the direct road which He originally
intended, because He feared they might meet on that way with
hardships too great for their ordinary strength; He took them by
another road in order to obtain thereby His original object. In the
same manner God refrained from prescribing what the people by
their natural disposition would be incapable of obeying, and gave the
above-mentioned commandments as a means of securing His chief
object, viz., to spread a knowledge of Him [among the people], and
to cause them to reject idolatry. It is contrary to man’s nature that
he should suddenly abandon all the different kinds of Divine service
and the different customs in which he has been brought up, and
which have been so general, that they were considered as a matter
of course; it would be just as if a person trained to work as a slave
with mortar and bricks, or similar things, should interrupt his work,
clean his hands, and at once fight with real giants. It was the result
of God’s wisdom that the Israelites were led about in the wilderness
till they acquired courage. For it is a well-known fact that travelling
in the wilderness, and privation of bodily enjoyments, such as
bathing, produce courage, whilst the reverse is the source of faint-
heartedness; besides, another generation rose during the
wanderings that had not been accustomed to degradation and
slavery. All the travelling in the wilderness was regulated by Divine
commands through Moses; comp. “At the commandment of the Lord
they rested, and at the commandment of the Lord they journeyed;
they kept the charge of the Lord and the commandment of the Lord
by the hand of Moses” (Num. ix. 23). In the same way the portion of
the Law under discussion is the result of divine wisdom, according to
which people are allowed to continue the kind of worship to which
they have been accustomed, in order that they might acquire the
true faith, which is the chief object [of God’s commandments]. You
ask, What could have prevented God from commanding us directly,
that which is the chief object, and from giving us the capacity of
obeying it? This would lead to a second question, What prevented
God from leading the Israelites through the way of the land of the
Philistines, and endowing them with strength for fighting? The
leading about by a pillar of cloud by day and a pillar of fire by night
would then not have been necessary. A third question would then be
asked in reference to the good promised as reward for the keeping
of the commandments, and the evil foretold as a punishment for
sins. It is the following question: As it is the chief object and
purpose of God that we should believe in the Law, and act according
to that which is written therein, why has He not given us the
capacity of continually believing in it, and following its guidance,
instead of holding out to us reward for obedience, and punishment
for disobedience, or of actually giving all the predicted reward and
punishment? For [the promises and the threats] are [325]but the
means of leading to this chief object. What prevented Him from
giving us, as part of our nature, the will to do that which He desires
us to do, and to abandon the kind of worship which He rejects?
There is one general answer to these three questions, and to all
questions of the same character; it is this: Although in every one of
the signs [related in Scripture] the natural property of some
individual being is changed, the nature of man is never changed by
God by way of miracle. It is in accordance with this important
principle that God said, “O that there were such an heart in them,
that they would fear me,” etc. (Deut. v. 26). It is also for this reason
that He distinctly stated the commandments and the prohibitions,
the reward and the punishment. This principle as regards miracles
has been frequently explained by us in our works; I do not say this
because I believe that it is difficult for God to change the nature of
every individual person; on the contrary, it is possible, and it is in His
power, according to the principles taught in Scripture; but it has
never been His will to do it, and it never will be. If it were part of His
will to change [at His desire] the nature of any person, the mission
of prophets and the giving of the Law would have been altogether
superfluous.
The Law is also intended to give its followers purity and holiness; by
teaching them to suppress sensuality, to guard against it and to
reduce it to a minimum, as will be explained by us. For when God
commanded [Moses] to sanctify the people for the receiving of the
Law, and said, “Sanctify them to-day and to-morrow” (Exod. xix.
10), Moses [in obedience to this command] said to the people,
“Come not at your wives” (ibid. ver. 15). Here it is clearly stated that
sanctification consists in absence of sensuality. But abstinence from
drinking wine is also called holiness; in reference to the Nazarite it is
therefore said, “He shall be holy” (Num. vi. 5). According to Siphra
the words, “sanctify yourselves and be ye holy” (Lev. xx. 7), refer to
the sanctification effected by performing the divine commands. As
the obedience to such precepts as have been mentioned above is
called by [328]the Law sanctification and purification, so is defilement
applied to the transgression of these precepts and the performance
of disgraceful acts, as will be shown. Cleanliness in dress and body
by washing and removing sweat and dirt is included among the
various objects of the Law, but only if connected with purity of
action, and with a heart free from low principles and bad habits. It
would be extremely bad for man to content himself with a purity
obtained by washing and cleanliness in dress, and to be at the same
time voluptuous and unrestrained in food and lust. These are
described by Isaiah as follows: “They that sanctify themselves and
purify themselves in the gardens, but continue their sinful life, when
they are in the innermost [of their houses], eating swine’s flesh, and
the abomination, and the mouse” (Isa. lxvi. 17): that is to say, they
purify and sanctify themselves outwardly as much as is exposed to
the sight of the people, and when they are alone in their chambers
and the inner parts of their houses, they continue their
rebelliousness and disobedience, and indulge in partaking of
forbidden food, such as [the flesh of] swine, worms, and mice. The
prophet alludes perhaps in the phrase “behind one tree in the midst”
to indulgence in forbidden lust. The sense of the passage is
therefore this: They appear outwardly clean, but their heart is bent
upon their desires and bodily enjoyments, and this is contrary to the
spirit of the Law. For the chief object of the Law is to [teach man to]
diminish his desires, and to cleanse his outer appearance after he
has purified his heart. Those who wash their body and cleanse their
garments whilst they remain dirty by bad actions and principles, are
described by Solomon as “a generation that are pure in their own
eyes, and yet are not washed from their filthiness; a generation, oh
how lofty are their eyes!” etc. (Prov. xxx. 12–13). Consider well the
principles which we mentioned in this chapter as the final causes of
the Law; for there are many precepts, for which you will be unable
to give a reason unless you possess a knowledge of these principles,
as will be explained further on.
[Contents]
CHAPTER XXXIV
It is also important to note that the Law does not take into account
exceptional circumstances; it is not based on conditions which rarely
occur. Whatever the Law teaches, whether it be of an intellectual, a
moral, or a practical character, is founded on that which is the rule
and not on that which is the exception; it ignores the injury that
might be caused to a single person through a certain maxim or a
certain divine precept. For the Law is a divine institution, and [in
order to understand its operation] we must consider how in Nature
the various forces produce benefits which are general, but in some
solitary cases they cause also injury. This is clear from what has
been said by ourselves as well as by others. We must consequently
not be surprised when we find that the object of the Law does not
fully appear in every individual; there must naturally be people who
are not perfected by the instruction of the Law, just as there are
beings which do not receive from the specific forms in Nature all that
they require. For all this comes from one God, is the result of one
act; “they are all given from one shepherd” (Eccles. xii. 11). It is
impossible to be otherwise; and we have already explained (chap.
xv.) that that which is impossible always remains [329]impossible and
never changes. From this consideration it also follows that the laws
cannot like medicine vary according to the different conditions of
persons and times; whilst the cure of a person depends on his
particular constitution at the particular time, the divine guidance
contained in the Law must be certain and general, although it may
be effective in some cases and ineffective in others. If the Law
depended on the varying conditions of man, it would be imperfect in
its totality, each precept being left indefinite. For this reason it would
not be right to make the fundamental principles of the Law
dependent on a certain time or a certain place; on the contrary, the
statutes and the judgments must be definite, unconditional, and
general, in accordance with the divine words: “As for the
congregation, one ordinance shall be for you and for the stranger”
(Num. xv. 15); they are intended, as has been stated before, for all
persons and for all times.
[Contents]
CHAPTER XXXV
In accordance with this intention I find it convenient to divide all
precepts into fourteen classes.
The second class comprises the precepts which are connected with
the prohibition of idolatry, and which have been described by us in
Hilkot aʻbodah-zarah. The laws concerning garments of linen and
wool, concerning the fruit of trees in the first three years after they
have been planted, and concerning divers seeds in a vineyard, are
likewise contained in this class. The object of these precepts is to
establish certain true principles and to perpetuate them among the
people.
The fifth class contains those precepts which relate to the prevention
of wrong and violence; they are included in our book in the section
Neziḳin. Their beneficial character is evident.
The sixth class is formed of precepts respecting fines, e.g., the laws
on theft and robbery, on false witnesses, and most of the laws
contained in the [330]section Shofetim belong to this class. Their
benefit is apparent; for if sinners and robbers were not punished,
injury would not be prevented at all: and persons scheming evil
would not become rarer. They are wrong who suppose that it would
be an act of mercy to abandon the laws of compensation for
injuries; on the contrary, it would be perfect cruelty and injury to the
social state of the country. It is an act of mercy that God
commanded “judges and officers thou shalt appoint to thee in all thy
gates” (Deut. xvi. 18).
The seventh class comprises those laws which regulate the business
transactions of men with each other; e.g., laws about loans, hire,
trust, buying, selling, and the like; the rules about inheritance
belong to this class. We have described these precepts in the
sections Ḳinyan and Mishpatim. The object of these precepts is
evident, for monetary transactions are necessary for the peoples of
all countries, and it is impossible to have these transactions without
a proper standard of equity and without useful regulations.
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.
ebooknice.com