Instant Access to An introduction to programming with Mathematica 3rd Edition Paul R. Wellin ebook Full Chapters
Instant Access to An introduction to programming with Mathematica 3rd Edition Paul R. Wellin ebook Full Chapters
https://ebookfinal.com
https://ebookfinal.com/download/an-introduction-
to-programming-with-mathematica-3rd-edition-paul-
r-wellin/
https://ebookfinal.com/download/programming-with-mathematica-4th-
revised-edition-edition-paul-wellin/
ebookfinal.com
https://ebookfinal.com/download/an-introduction-to-network-
programming-with-java-1st-edition-jan-graba/
ebookfinal.com
https://ebookfinal.com/download/an-introduction-to-bootstrap-methods-
with-applications-to-r-1st-edition-michael-r-chernick/
ebookfinal.com
https://ebookfinal.com/download/practical-programming-an-introduction-
to-computer-science-using-python-3-second-edition-paul-gries/
ebookfinal.com
Introduction to the mathematics of operations research
with Mathematica 2. ed Edition Hastings
https://ebookfinal.com/download/introduction-to-the-mathematics-of-
operations-research-with-mathematica-2-ed-edition-hastings/
ebookfinal.com
https://ebookfinal.com/download/observation-and-experiment-an-
introduction-to-causal-inference-1st-edition-paul-r-rosenbaum/
ebookfinal.com
https://ebookfinal.com/download/simply-java-an-introduction-to-java-
programming-programming-series-1st-edition-james-levenick/
ebookfinal.com
https://ebookfinal.com/download/matlab-an-introduction-with-
applications-3rd-edition-amos-gilat/
ebookfinal.com
https://ebookfinal.com/download/an-introduction-to-stata-
programming-2nd-edition-christopher-f-baum/
ebookfinal.com
An introduction to programming with Mathematica 3rd
Edition Paul R. Wellin Digital Instant Download
Author(s): Paul R. Wellin, Richard J. Gaylord, Samuel N. Kamin
ISBN(s): 9780521846783, 0521846781
Edition: 3
File Details: PDF, 6.48 MB
Year: 2005
Language: english
This page intentionally left blank
An Introduction to Programming with Mathematica
r
Wolfram Research is the holder of the copyright to the Mathematica software system
described in this document, including without limitation such aspects of the system as
its code, structure, sequence, organization, “look and feel”, programming language, and
compilation of command names. Use of the system unless pursuant to the terms of a
license granted by Wolfram Research or an otherwise authorized by law is an
infringement of the copyright.
1 An introduction to Mathematica
Numerical computations
Mathematica has been aptly described as a sophisticated calculator. With it you can enter
mathematical expressions and compute their values.
12
.08
In[1]:= Sin .86 Log 1
12
Out[1]= 0.481899
In[4]:= heat 83
Out[4]= 83
2 An Introduction to Programming with Mathematica
Yet Mathematica differs from calculators and simple computer programs in its ability to
calculate exact results and to compute to an arbitrary degree of precision.
1 1 1
In[6]:=
15 35 63
1
Out[6]=
9
In[7]:= 2500
Out[7]= 3273390607896141870013189696827599152216642046043064789483291
368096133796404674554883270092325904157150886684127560071009
217256545885393053328527589376
In[8]:= N , 500
Out[8]= 3.14159265358979323846264338327950288419716939937510582097494
459230781640628620899862803482534211706798214808651328230664
709384460955058223172535940812848111745028410270193852110555
964462294895493038196442881097566593344612847564823378678316
527120190914564856692346034861045432664821339360726024914127
372458700660631558817488152092096282925409171536436789259036
001133053054882046652138414695194151160943305727036575959195
309218611738193261179310511854807446237996274956735188575272
48912279381830119491
Symbolic computations
One of the more powerful features of Mathematica is its ability to manipulate and compute
with symbolic expressions. For example, you can factor polynomials and simplify trigono-
metric expressions.
In[9]:= Factor x5 1
Out[9]= 1 x 1 x x2 x3 x4
3
In[10]:= TrigReduce Sin
1
Out[10]= 3 Sin Sin 3
4
1 An introduction to Mathematica 3
You can simplify expressions using assumptions about variables contained in those expres-
sions. For example, if k is assumed to be an integer, sin 2 k x simplifies to sin x .
In[11]:= Simplify Sin 2 k x ,k Integers
Out[11]= Sin x
This computes the conditions for which a general quadratic polynomial will have both
roots equal to each other.
In[12]:= Reduce x,a x2 b x c 0 y,a y2 b y c 0 x y , a, b, c
b2
Out[12]= a 0 && b 0 a 0 && b c 0 a 0 && c
4a
The knowledge base of Mathematica includes algorithms for solving polynomial equations,
and computing integrals.
In[14]:= Solve x3 ax 1 0, x
1 3 1 3
2
3
a 9 3 27 4 a3
Out[14]= x 1 3
,
9 3 27 4 a3 21 3 32 3
1 3 a
x 1 3
22 3 31 3 9 3 27 4 a3
1 3
1 3 9 3 27 4 a3
,
2 21 3 32 3
1 3 a
x 1 3
22 3 31 3 9 3 27 4 a3
1 3
1 3 9 3 27 4 a3
2 21 3 32 3
1
In[15]:= x
1 x4
1
Out[15]= 2 ArcTan 1 2 x 2 ArcTan 1 2 x
4 2
Log 1 2 x x2 Log 1 2 x x2
4 An Introduction to Programming with Mathematica
Graphics
The ability to visualize functions or sets of data often allows us greater insight into their
structure and properties. Mathematica provides a wide range of graphing capabilities.
These include two- and three-dimensional plots of functions or data sets, contour and
density plots of functions of two variables, bar charts, histograms and pie charts of data
sets, and many packages designed for specific graphical purposes. In addition, the Mathemat-
ica programming language allows you to construct graphical images “from the ground up”
using primitive elements, as we will see in Chapter 9.
Here is a simple two-dimensional plot of the function sin x 2 sin x2 .
0.5
3 2 1 1 2 3
0.5
Out[16]= Graphics
You can combine two or more plots in a single graphic by enclosing them inside curly
braces.
In[17]:= Plot Sin x , Sin 2 x , x, 0, 2 ;
1
0.5
1 2 3 4 5 6
0.5
1
1 An introduction to Mathematica 5
0.8
0.6
0.4
0.2
6 4 2 2 4 6
0.2
You can immediately plot the data using the ListPlot function.
In[25]:= ListPlot data, PlotStyle PointSize .02 ;
17500
15000
12500
10000
7500
5000
2500
2 2 4 6 8
You can then fit a straight line to the log-data by performing a linear least squares fit. In
this example, we are fitting to the model a m x, where a and m are the parameters to be
determined in the model with variable x.
In[27]:= f FindFit Log data , a m x, a, m , x
Out[27]= a 4.15437, m 0.761465
10
2 2 4 6 8
8 An Introduction to Programming with Mathematica
Finally, you can see how well the fitted function approximates the log plot by combining
these last two graphics.
In[29]:= Show fplot, logplot ;
10
2 2 4 6 8
Programming
With a copy of The Mathematica Book (Wolfram 2003) or one of the many tutorial books
(see, for example, Glynn and Gray 1999) describing the vast array of computational tasks
that can be performed with Mathematica, it would seem you can compute just about
anything you might want. But that impression is mistaken. There are simply more kinds of
calculations than could possibly be included in a single program. Whether you are inter-
ested in computing bowling scores or finding the mean square distance of a random walk
on a torus, Mathematica does not have a built-in function to do everything that a user could
possibly want. What it does have – and what really makes it the amazingly useful tool it is –
is the capability for users to define their own functions. This is called programming, and it
is what this book is all about.
Sometimes, the programs you create will be succinct and focused on a very specific
task. Mathematica possesses a rich set of tools that enable you to quickly and naturally
translate the statement of a problem into a program. For example, the following program
defines a test for perfect numbers, numbers that are equal to the sum of their proper
divisors.
In[30]:= PerfectQ n_ : Apply Plus, Divisors n 2n
We then define another function that selects those numbers from a range of integers that
pass this PerfectQ test.
In[31]:= PerfectSearch n_ : Select Range n , PerfectQ
1 An introduction to Mathematica 9
Here are two functions for representing regular polygons. The first defines the
vertices of a regular n-gon, while the second uses those vertices to create a polygon graph-
ics object that can then be displayed with the built-in Show function.
In[33]:= vertices n_Integer, r_: 1 :
2 2
Table r Cos , r Sin , , 0, n 1
n n
In[34]:= RegularPolygon n_ :
Graphics Line vertices n . a_, b__ a, b, a ,
AspectRatio Automatic
Out[35]= Graphics
In[37]:= g x_ : x3 2 x2 1
Of course, sometimes the task at hand requires a more involved program, stretching
across several lines (or even pages) of code. For example, here is a slightly longer program
to compute the score of a game of bowling, given a list of the number of pins scored by
each ball.
10 An Introduction to Programming with Mathematica
Out[42]= Graphics3D
Here is a short program that creates a button containing the above two expressions.
Cell[BoxData[
ButtonBox[
RowBox[{"Stellate", " ", "Icosahedron"}],
ButtonFunction:>CompoundExpression[
Needs[ "Graphics`Polyhedra`"],
Show[Stellate[Polyhedron[Icosahedron]]]
],
ButtonEvaluator->Automatic],
"Input",
Active->True]
The formatted version of the above cell can be displayed by choosing Show Expression
from the Format menu. When you do that, it will look like the following:
Stellate Icosahedron
Clicking the button will cause the Mathematica code in the ButtonFunction to be
immediately evaluated and the following graphics will then be displayed in your notebook.
Functions are available to jump around to different parts of a Mathematica notebook
and perform various actions. Here is a short piece of code that creates a button which,
upon being clicked, moves the selection to the next cell and then evaluates that cell.
12 An Introduction to Programming with Mathematica
Cell[TextData[{
Cell[BoxData[
ButtonBox["EVALUATE",
ButtonFunction:>FrontEndExecute[ {
FrontEnd`SelectionMove[
ButtonNotebook[ ], All, ButtonCell],
FrontEnd`SelectionMove[
ButtonNotebook[ ], Next, Cell],
FrontEnd`SelectionEvaluate[
ButtonNotebook[ ]]}],
Active->True]]],
StyleBox[" MATHEMATICA INPUT"]
}], "Text"]
The formatted version of the above cell can be displayed by choosing Show Expression
from the Format menu. When you do that, it will look somewhat like the following
(although we have removed some of the text formatting above to improve readability of the
code). Clicking the EVALUATE button will cause the input cell immediately following to
be selected and then evaluated.
In[43]:= 3 4 5
Out[43]= 27
The following example demonstrates how you can use Mathematica functions to
perform some of the user interface actions that you would normally associate with key-
board and mouse events. By using such techniques, you can create a specific set of actions
that will follow certain evaluations. For example, if you were creating an electronic quiz for
your students, you could include “hint” buttons within your class notebooks that would
open a new notebook with hints and suggestions upon clicking.
This creates a new notebook that contains three cells – a Section cell, a Text cell,
and an Input cell. Upon evaluation, the NotebookPut command below will cause a new
notebook to appear, containing the three specified cells. The screen shots below show
what appears in the user interface after evaluating each of the preceding inputs.
1 An introduction to Mathematica 13
In[44]:= nb NotebookPut
Notebook
Cell "Symbolic and Interactive Documents", "Section" ,
Cell "Cells and notebooks are Mathematica expressions.",
"Text" ,
Cell "Integrate Sin x Cos x ,x ", "Input"
This moves the selection bar past the last cell in the above notebook.
In[45]:= SelectionMove nb, Next, Cell, 4
14 An Introduction to Programming with Mathematica
In Chapter 10 we will give a detailed discussion of how to modify and manipulate the
user interface through the use of the symbolic programming techniques that are discussed
throughout this book.
1 An introduction to Mathematica 15
The computer will then load parts of Mathematica into its memory and soon a blank
window will appear on the screen. This window is the visual interface to a Mathematica
notebook and it has many features that are useful to the user.
Notebooks allow you to write text, perform computations, write and run programs,
and create graphics all in one document. Notebooks also have many of the features of
common word processors, so those familiar with word processing will find the notebook
interface easy to learn. In addition, the notebook provides features for outlining material
which you may find useful for giving talks and demonstrations.
16 An Introduction to Programming with Mathematica
When a blank notebook first appears on the screen (either from just starting Mathe-
matica or from selecting New in the File menu), you can start typing immediately. For
example, if you type N[Pi,200] press (hold down the Shift key while pressing
the Enter key) to evaluate an expression. Mathematica will evaluate the result and print the
200-decimal digit approximation to on the screen.
Notice that when you evaluate an expression in a notebook, Mathematica adds input
and output prompts. In the example notebook above, these are denoted In[1]:= and
Out[1]=. These prompts can be thought of as markers (or labels) that you can refer to
during your Mathematica session.
1 An introduction to Mathematica 17
You should also note that when you started typing Mathematica placed a bracket on
the far right side of the window that enclosed the cell that you were working in. These cell
brackets are helpful for organizational purposes within the notebook. Double-clicking on
cell brackets will open any collapsed cells, or close any open cells as can be seen in the
previous screen shot.
Double-clicking on the cell bracket containing the 1.1 A Brief Overview of Mathe-
matica cell will open the cell to display its contents:
Using cell brackets in this manner allows you to organize your work in an orderly
manner, as well as to outline material. For a complete description of cell brackets and
many other interface features, you should consult the documentation that came with your
version of Mathematica.
For information on other features such as saving, printing, and editing notebooks,
consult the manuals that came with your version of Mathematica.
Entering input
New input can be entered whenever there is a horizontal line that runs across the width of
the notebook. If one is not present where you wish to place an input cell, move the cursor
up and down until it changes to a horizontal bar and then click the mouse once. A horizon-
tal line should now appear across the width of the window. You can immediately start
typing and an input cell will be created.
18 An Introduction to Programming with Mathematica
Input can be entered exactly as it appears in this book. To get Mathematica to evalu-
ate an expression that you have entered, press - ; that is, hold down the Shift key
and then press the Enter key.
You can enter mathematical expressions in a traditional looking two-dimensional
format using either palettes for quick entry of template expressions, or keyboard equiva-
lents. For example, the following expression can be entered by using the Basic Input
palette, or through a series of keystrokes. For details of inputting mathematical expres-
sions, read your user documentation or read the section on 2D Expression Input in the
Help Browser.
1
In[1]:= x
1 x3
1 2x
ArcTan 1 1
3
Out[1]= Log 1 x Log 1 x x2
3 3 6
As noted previously, Mathematica enters the In and Out prompts for you. You do
not type these prompts. You will see them after you evaluate your input.
You can refer to the result of the previous calculation using the symbol %.
In[2]:= 264
Out[2]= 18446744073709551616
In[3]:= % 1
Out[3]= 18446744073709551617
You can also refer to the result of any earlier calculation using its Out[i] label or,
equivalently, %i.
In[4]:= Out 1
1 2x
ArcTan 1 1
3
Out[4]= Log 1 x Log 1 x x2
3 3 6
In[5]:= %2
Out[5]= 18446744073709551616
• Macintosh: type . (the Command key and the period) and then type a
These attempts to stop the computation will sometimes fail. If after waiting a reason-
able amount of time (say, a few minutes), Mathematica still seems to be stuck, you will have
to “kill the kernel.” (Before attempting to kill the kernel, try to convince yourself that the
computation is really in a loop from which it will not return and that it is not just an
intensive computation that requires a lot of time.) Killing the kernel is accomplished by
selecting Quit Kernel from the Kernel menu. The kernel can then be restarted without
killing the front end by first selecting Start Kernel Local under the Kernel menu, or you
can simply evaluate a command in a notebook and a new kernel should start up
automatically.
Alternately, you can enter this expression in the traditional form by typing 39, / , then
13.
39
In[7]:=
13
Out[7]= 3
You can enter this expression in a more traditional typeset form by typing 2, ^ , and
then 5.
In[9]:= 25
Out[9]= 32
x SqrtBox x 2, x
x y GreaterEqual x, y x ,y
You can indicate multiplication by simply putting a space between the two factors, as
in mathematics. You can also use the asterisk (*) for that purpose, as is traditional in most
computer languages.
In[10]:= 25
Out[10]= 10
In[11]:= 2 5
Out[11]= 10
Functions are also written as they are in mathematics books, except that function
names are capitalized and their arguments are enclosed in square brackets.
In[13]:= Factor x5 1
Out[13]= 1 x 1 x x2 x3 x4
Almost all of the built-in functions are spelled out in full, as in the above example.
The exceptions to this rule are well-known abbreviations such as D for differentiation,
Sqrt for square roots, Log for logarithms, and Det for the determinant of a matrix.
Spelling out the name of a function in full is quite useful when you are not sure whether a
function exists to perform a particular task. For example, if we wanted to compute the
conjugate of a complex number, an educated guess would be:
In[14]:= Conjugate 3 4
Out[14]= 3 4
Whereas square brackets [ and ] are used to enclose the arguments to functions,
curly braces { and } are used to indicate a list or range of values. Lists are a basic data type
in Mathematica and are used to represent vectors and matrices (and tensors of any dimen-
sion), as well as additional arguments to functions such as in Plot and Integrate.
In[15]:= a, b, c . x, y, z
Out[15]= ax by cz
0.5
6 4 2 2 4 6
0.5
In the Plot example, the list {x,-2 ,2 } indicates that the function
sin x 2 sin x is to be plotted over an interval as x takes on values from 2 to 2 .
The Integrate expression above is equivalent to the mathematical expression
b
a
cos x x.
22 An Introduction to Programming with Mathematica
%
In[20]:=
Length nums
10001
Out[20]=
2
An expression can be entered on multiple lines, but only if Mathematica can tell that
it is not finished after the first line. For example, you can enter 3* on one line and 4 on the
next.
In[21]:= 3 *
4
Out[21]= 12
But you cannot enter 3 on the first line and *4 on the second.
In[22]:= 3
*4
Out[22]= 3
With the notebook interface, you can input as many lines as you like within an input
cell; Mathematica will evaluate them all when you enter still obeying the rules
stated above for any incomplete lines.
1 An introduction to Mathematica 23
Finally, you can enter a comment – some words that are not evaluated – by entering
the words between (* and *).
In[24]:= D[Sin[x], (* differentiate Sin[x] *)
{x, 1}] (* with respect to x once *)
Out[24]= Cos x
For functions with two arguments, you can use an infix notation. The following
expression is identical to N[ ,30].
In[28]:= N 30
Out[28]= 3.14159265358979323846264338328
Finally, many people prefer to use a more traditional syntax when entering and
working with mathematical expressions. You can compute an integral using standard
Mathematica syntax.
In[29]:= Integrate 1 Sin x , x
x x
Out[29]= Log Cos Log Sin
2 2
24 An Introduction to Programming with Mathematica
The same integral, represented in a more traditional manner, can be entered from palettes
or keyboard shortcuts.
1
In[30]:= x
Sin x
x x
Out[30]= Log Cos Log Sin
2 2
Many mathematical functions have traditional symbols associated with their opera-
tions and when available these can be used instead of the fully spelled-out names. For
example, you can compute the intersection of two sets using the Intersection function.
In[31]:= Intersection a, b, c, d, e , b, f, a, z
Out[31]= a, b
To learn how to enter these and other notations quickly, either from palettes or
directly from the keyboard using shortcuts, refer to the 2D Expression Input section in the
Front End category of the Help Browser.
• kernel does the computation and sends it back to the front end (kernel)
There is one remaining piece that we have not yet mentioned; that is MathLink.
Since the kernel and front end are two separate programs, a means of communication is
1 An introduction to Mathematica 25
necessary for these two programs to “talk” to each other. That communication protocol is
called MathLink and it comes bundled with Mathematica. It operates behind the scenes,
completely transparent to the user.
MathLink is a very general communications protocol that is not limited to communi-
cation between the front end and the kernel, but can also be used to set up communication
between the front end and other programs on your computer, programs like compiled C
and Fortran code. It can also be used to connect a kernel to a word processor or spread-
sheet or many other programs.
MathLink programming is beyond the scope of this book, but if you are interested,
there are several books and articles that discuss it (see the References at the end of this
book).
Errors
In the course of using and programming in Mathematica, you will encounter various sorts
of errors, some obvious, some very subtle, some easily rectified, and others not. We have
already mentioned that it is possible to send Mathematica into an infinite loop from which
it cannot return. In this section, we discuss those situations where Mathematica does finish
the computation, but without giving you the answer you expected.
Perhaps the most frequent error you will make is misspelling the name of a function.
Here is an illustration of the kind of thing that will usually happen in this case.
In[33]:= Sine 1.5
General::spell :
Possible spelling error: new symbol name "Sine" is
similar to existing symbols Line, Sin, Sinh . More…
Whenever you type a name that is close to an existing name, Mathematica will print a
warning message like the one above. You may often use such names intentionally, in which
case these messages can be annoying. In that case, it is best to turn off the warnings.
In[34]:= Off General::spell
Now, Mathematica will not report that function names might be misspelled; and,
when it cannot find a definition associated with a misspelled function, it returns your input
unevaluated.
In[35]:= Intergate x2 , x
Out[35]= Intergate x2 , x
26 An Introduction to Programming with Mathematica
Of course, some kinds of inputs cause genuine error messages. Syntax errors, as
shown above, are one example. The built-in functions are designed to usually warn you of
such errors in input. In the first example below, we have supplied the Log function with an
incorrect number of arguments (it expects one or two arguments only). In the second
example, FactorInteger operates on integers only and so the real number argument
causes the error condition.
In[38]:= Log 2, 16, 3
Log::argt : Log called with 3
arguments; 1 or 2 arguments are expected. More…
Getting help
Mathematica contains a vast array of documentation that you can access in a variety of
ways. It is also designed so that you can create new documentation for your own functions
and program in such a way that users of your programs can get help in exactly the same
way as they would for Mathematica’s built-in functions.
If you are aware of the name of a function but are unsure of its syntax or what it does,
the easiest way to find out about it is to evaluate ?function. For example, here is the
usage message for ParametricPlot.
1 An introduction to Mathematica 27
In[40]:= ?ParametricPlot
ParametricPlot fx, fy , u, umin, umax produces a parametric
plot of a curve with x and y coordinates fx and fy generated
as a function of t. ParametricPlot fx, fy , gx, gy , ... ,
u, umin, umax plots several parametric curves. More…
Also, if you were not sure of the spelling of a command (Integrate, for example),
you could type the following to display all built-in functions that start with Integ.
In[41]:= ?Integ*
System`
Integer IntegerExponent IntegerQ Integrate
IntegerDigits IntegerPart Integers
Clicking on one of these links will produce a short usage statement about that
function. For example, if you were to click on the Integrate link, here is what would be
displayed in your notebook.
Integrate f, x gives the indefinite integral of f with respect
to x. Integrate f, x, xmin, xmax gives the definite
integral of f with respect to x from xmin to xmax. Integrate
f, x, xmin, xmax , y, ymin, ymax gives a multiple
definite integral of f with respect to x and y. More…
Clicking the More… hyperlink would take you directly to the Help Browser where a
much more detailed explanation of this function can be found.
You can also get help by highlighting any Mathematica function and pressing the F1
key on your keyboard. This will take you directly into the documentation for that function
in the Help Browser.
Notice the eight category tabs near the top of the Help Browser window. Choosing
the Add-ons & Links tab will give you access to all of the packages that come with each
implementation of Mathematica. Similarly, choosing The Mathematica Book tab will give
you access to the entire Mathematica book that ships with each professional version of
Mathematica.
Suppose you were looking for information about three-dimensional parametric
graphics. First click the Built-in Functions tab, then select Graphics and Sound on the left,
then 3D Plots and finally ParametricPlot3D. The Help Browser should look like this:
Notice that in the main window, the Help Browser has displayed information about
the ParametricPlot3D function. This is identical to the usage message you would get
if you entered ?ParametricPlot3D.
1 An introduction to Mathematica 29
Alternatively, you could have clicked the Master Index tab and searched for “Paramet-
ricPlot3D” or even simply “parametric” and then browsed through the index to find what
you were looking for.
Many additional features are available in the Help Browser and you are advised to
consult your documentation for a complete list and description.
2 The Mathematica language
Expressions are the basic building blocks from which everything is built. Their
structure, internal representation, and how they are evaluated are essential to under-
standing Mathematica. In this chapter we focus on the Mathematica language with
particular emphasis on the structure and syntax of expressions. We will also look at
how to define and name new expressions, how to combine them using logical opera-
tors, and how to control properties of your expressions through the use of attributes.
2.1 Expressions
Introduction
Although it may appear different at first, everything that you will work with in Mathematica
has a similar underlying structure. This means things like a simple computation, a data
object, a graphic, the cells in your Mathematica notebook, even your notebook itself, all
have a similar structure – they are all expressions, and an understanding of expressions is
essential to mastering Mathematica.
The Head function can be used to identify types of objects. For numbers, it will
report whether the number is an integer, a rational number, a real number, or a complex
number.
1
In[1]:= Head 7 , Head , Head 7.0 , Head 7 2
7
Out[1]= Integer, Rational, Real, Complex
In fact, every Mathematica expression has a Head that gives some information about
that type of expression.
In[2]:= Head a b
Out[2]= Plus
In[3]:= Head 1, 2, 3, 4, 5
Out[3]= List
Atoms
The three basic building blocks of Mathematica – the atoms – from which every expression
is ultimately constructed are, symbols, numbers, and strings.
A symbol consists of a letter followed without interruption by letters and numbers.
For example, both f and the built-in Integrate are symbols.
In[4]:= Head f
Out[4]= Symbol
Symbols can consist of one or more concatenated characters so long as they do not begin
with a number.
In[7]:= Head myfunc
Out[7]= Symbol
2 The Mathematica language 33
The four kinds of numbers – integers, real numbers, complex numbers and rational
numbers – are shown in the list below.
5
In[8]:= Head 4 , Head , Head 5.201 , Head 3 4
7
Out[8]= Integer, Rational, Real, Complex
h e1 , e2 , …, en
Although we indicated that you can use Head to determine the type of atomic
expressions, this is entirely general. For normal expressions, Head simply gives the head of
that expression.
In[10]:= Head a b c
Out[10]= Plus
In[12]:= FullForm a, b, c
Out[12]//FullForm=
List a, b, c
The important thing to notice is that both of these objects (the sum and the list) have
very similar internal representations. Each is made up of a function (Plus and List,
34 An Introduction to Programming with Mathematica
respectively), each encloses its arguments in square brackets, and each separates its argu-
ments with commas.
Regardless of how an atomic or normal expression may appear in your notebook, its
structure is uniquely determined by its head and parts as seen using FullForm. This is
important for understanding the Mathematica evaluation mechanism which depends on the
matching of patterns based on their FullForm representation, a subject we will turn to in
detail in Chapter 6.
The number of elements in any expression is given by its length.
In[13]:= Length a b c
Out[13]= 3
Out[14]= c bx a x2 Sin x
Its head is Times because it is composed of the product of Sin[x] and the quadratic
polynomial.
In[15]:= Head expr
Out[15]= Times
Although the FullForm of this expression is a little harder to decipher, if you look
carefully you should see that it is composed of the product of Plus[c,Times[b,x],
Times[a,Power[x,2]]] and Sin[x].
In[17]:= FullForm expr
Out[17]//FullForm=
Times Plus c, Times b, x , Times a, Power x, 2 , Sin x
There are several important differences between atomic expressions and nonatomic
expressions. While the heads of all expressions are extracted in the same way – using the
Head function – the head of an atom provides different information than the head of other
expressions. For example, the head of a symbol or string is the kind of atom that it is.
In[18]:= Head Integrate
Out[18]= Symbol
Random documents with unrelated
content Scribd suggests to you:
Cilliers, die de Kommandant was, in afwezigheid van Pieter Retief. Oom
Charel stond [116]voor zijn tent, en rookte rustig een pijp toen David
aankwam. Hij was geheel uit adem, en half stokkend, zeide hij:
„Oom Charel, die Zulu’s kom aan; hullie het al die menschen in Botha’s kamp
vermoord.”
„Lager maken, die Zulu’s kom,” riep hij uit. „Trek de wagens bij elkaar,” en
zoo volgde het eene bevel na het andere. David zadelde snel zijn paard af,
en liet het los staan bij zijn wagen. Hij had thans geen tijd om voor het arme
dier te zorgen hoe graag hij dit ook wilde. Integendeel hij moest eerst helpen
zorgen voor de bescherming der vrouwen en kinderen.
Een levendig tooneel vond nu plaats. In een oogenblik waren alle handen
aan het werk om de wagens in een vasten kring te trekken, zoo na mogelijk
bij elkaar. Het volk werd gezonden om bosschen en takken te kappen, om de
openingen tusschen de wagens op te vullen. Het vee werd toen zoover
mogelijk aan een anderen kant van een nabijzijnden berg gejaagd, om uit het
gezicht der Kaffers te zijn, en daar werd het aan zijn lot overgelaten.
Geweren werden schoongemaakt, en Charel Cilliers liet de ammunitiewagen
openen en deelde kruid en lood uit.
„Mijn machtig, kerel, ik hêt die heele kanon vergeet. Hij staat daar achter bij
die tent. Loop haal hem gauw met een spul kerels dan zal ons hem hier bij
den ingang plaatsen.”
De ingang was eene kleine ruimte van zoowat 8 voet breed, die thans met
takken en bosschen dicht versperd was. Het kanon werd nu hier gebracht.
Het was een oud koperen mondstuk, op een affuit dat waarschijnlijk een oud
scheepskanon was geweest, en dat door een der trekkers was
medegebracht. Het was algemeen beschouwd geweest als een nutteloos
ding, maar heden kon het toch van nut zijn.
„Ons kan niet banja met die ding schiet,” zeide Oom Charel, „want dit vat te
veel kruit, maar als [118]die Kaffers het ons hier te warm maak, dan kan ons
een paar schoten op hen los.”
„Maar ons hêt geen kogels, Oom Charel,” zeide een der Boeren.
„Ons kan die ding met stukken lood en oud ijzer laden; hullie noem dit
schroot,” zeide de heer Alfred Smith, dien wij reeds kennen als de meester
en secretaris.
„Weet jij iets van die goed af, meester?” vroeg Charel Cilliers, die zelf maar
weinig met die „goed” te doen had gehad.
„Ja, Oom Charel, zoo’n beetje” was het antwoord van den meester. „Ik heb al
met zulke dingen gewerkt.”
Al dit werk nam nauwelijks den tijd van twee uur op, want men werkte met
ijver en kracht. Geen Kaffer was nog te bespeuren, en men gebruikte den tijd
om zich nog steeds beter gereed te maken en de meest zorgvuldige
maatregelen te nemen. Er waren zoo wat negentig weerbare mannen in het
kamp, buiten de kleurlingen, en een aantal dezer had men ook gewapend
met geweren zoodat het geheel der verdedigers een goed eind over de
honderd was. Een aantal spaargeweren werden aan de vrouwen gegeven
om die aan de mannen achter de wagens te overhandigen, indien hun eigen
geweren te warm werden.
Het was bijna tien uur toen een der Boeren riep: „Daar kom hullie!” en
inderdaad op den rand, die zoowat duizend treden aan de zuidzijde van het
lager was, begon zich een dichte drom Kaffers te vertoonen.
„Op jullie plek,” riep de oude Cilliers, „moet niet schiet voor hullie op ons is.
En God, de God van Israël sta ons thans bij,” voegde hij er langzaam en
eerbiedig bij.
De Boeren lieten hen naderen tot op zestig treden van de wagens, en toen
dreunden de geweerschoten, en een honderdtal Zulu’s beten in het stof.
Doch de anderen stuitten niet, doch kwamen aan. Thans vuurde elke Boer
voor zichzelve zoo snel hij kon, en schoot ieder zijn naastbijzijnden Kaffer
neder. De strijd werd fel. De geweerschoten knalden onophoulijk, en het
geraas was oorverdoovend. Bij den ingang had Charel Cilliers tien fluksche
mannen geplaatst en deze hadden hunne handen vol, om de Zulu te beletten
door de takken en bosschen te komen. Doch [121]spoedig vormden de lijken
der gevallen Zulu’s hier een breede borstwering.
David stond voor op de wagenkist van een wagen, en elke kogel uit zijn
geweer deed een Kaffer nedertuimelen. Martje stond dicht bij hem, achter
den wagen; zij had een geladen geweer in haar hand, gereed om dit aan
David te reiken, zoodra zijn eigen geweer te warm werd. Doch dit was thans
niet noodig. De Zulu’s op zulk een ontvangst niet voorbereid, en geen kans
ziende, om door den kogelregen in het lager te komen, namen de vlucht, ten
minste voor het oogenblik, en liepen zoo snel zij konden naar het randje waar
hunne makkers, die nog geen deel aan den strijd hadden genomen, stonden.
Een groot aantal der aanvallers lagen dood of gewond voor het lager; bij
verre de meesten echter van deze waren dood.
De Zulu’s hielden nu weder raad, en zij konden dit gerust doen, want zij
waren buiten het bereik der oude Sanna’s, die niet verder schoten dan uiterst
tweehonderd treden. De Boeren kregen nu een goed half uur rust, en dit was
hun uiterst welkom, want het gevecht was hevig geweest. Tot op dit
oogenblik was er slechts een Boer licht gewond, daar een stoutmoedige
Kaffer, hem met een assegaai in den arm gestoken had. De dappere kerel
liet de wond [122]door zijne vrouw verbinden, en was daarna weer even
gereed om op zijn post te gaan.
Na verloop van een half uur begon er weder beweging onder de Kaffers te
komen. Doch ditmaal veranderden zij van tactiek. In plaats van het lager te
omringen kwamen zij nu in een dichten drom aan, en dat wel direct op de
opening van het lager. Zij hadden begrepen dat dit het zwakste punt van het
lager was, en wilden nu met geweld en door hun overmacht zich hier een
weg banen. Doch Charel Cilliers bemerkte dadelijk hun doel, hij was te veel
ervaren om zich te laten verschalken. Een twintigtal man bij de wagens
latende, liet hij al de anderen post vatten in de nabijheid van den ingang.
„Nu komt mijn tijd,” zeide meester, toen hij de Kaffers zag naderen, „jullie
moet nou voor pad geven.” En met deze woorden nam hij zijn lont in de hand
en liet de vier jonge Boeren, die hem hielpen, alles in gereedheid brengen
om het kanon weder te laden, zoodra het afgeschoten was.
De Zulu’s kwamen stadig aan, tot op een afstand van tweehonderd treden;
toen maakten zij een wilden schielijken aanval op de opening. Doch de
ontvangst die zij kregen van het thans geconcentreerde vuur der Boeren,
was geenszins malsch, en toen nu meester zijn kanon tusschen de dichte
massa afvuurde, en stukken [123]ijzer door hunne rijen heenvlogen, deinsden
zij een oogenblik terug. Maar ook net maar een oogenblik—toen kwamen zij
met vernieuwden moed aan. Doch tegen den kogelregen die thans op hen
nederkletterde en tegen de drie schoten die meester snel op hen loste, was
zelfs Zulu-moed niet bestand, en met verlies van een groot aantal dooden,
sloegen zij op wilde vlucht.
„Goed gedaan meester, dat is braaf,” riep Charel Cilliers uit toen de Zulu’s
weg waren. „Daar die Oû Griet is al te kwaai voor hullie. Maar nou moet jullie
oppas, kerels; die ergste zal nog komen. Die andere Zulu’s zal ons nou pak.”
Thans volgden zij weder hun oude tactiek en onder bevel van den man met
den vederbos, begonnen zij het lager te omringen. Ieder der Boeren was nu
weder op zijn ouden post. De Zulu’s sloegen als bezetenen op hunne
schilden, en hieven [124]een ontzettenden krijgskreet aan, die het bloed in de
aderen der dapperste Boeren deed verstijven. Een storm, en de Zulu’s waren
bij de wagens. Doch de Boeren weerden zich dapper; de gedachte aan de
vrouwen en kinderen gaf hun heldenmoed. De geweren knalden zonder
ophouden. De Kaffers klommen tot op de wagens, doch vonden daar ook
hunnen dood; geen Kaffer kwam het lager binnen.
De dappere Martje schiet de Zulu neer!
David was op zijn ouden post, en Martje stond weder bij hem, met het
geladen geweer in de hand. Onze held had juist een forsche Kaffer den
doodskogel gegeven, op geen drie treden afstand, toen een tweede Kaffer,
bij den wagen opsprong, en voor David zijn geweer geladen had, den
assegaai ophief om den jongen Boer dien in de borst te boren. Davids leven
hing aan een draad. Hij trachtte instinctmatig de assegaai met zijn geweer
weg te keeren, doch hij voelde, dat de dood hem voor oogen stond. Daar
knalde een schot, en de Zulu, door een kogel in het hart getroffen, stortte
zielloos van den wagen neder. Het was Martje geweest die het schot had
gevuurd. Zij had het gevaar gezien waarin haar minnaar zweefde, en in een
oogwenk was het zware geweer aan haar schouder, en trok zij den trekker.
Doch David kon dit niet zien, want hij had geen tijd om om te kijken. Zoodra
de Kaffer nederstortte [125]laadde hij zijn geweer weder en hield hij aan met
vuren op de aanvallers.
„Martje, die ander geweer,” riep hij opeens en het dappere meisje reikte hem
dit. Zij had het weder geladen, en ontving nu het brandend heete geweer, dat
zij dadelijk begon af te koelen met koud water.
Het was inderdaad zooals Charel Cilliers gezegd had: het ergste kwam nu
eerst. Een achttal Boeren waren reeds min of meer zwaar gewond; twee
zelfs waren er gedood. Bij den ingang was de strijd het hevigst, en slechts
door het nu en dan afvuren van het kanon, dat de Zulu’s schrik inboezemde
omdat bij elk schot een aantal hunner tegelijk vielen, was men in staat deze
gevaarlijke positie te verdedigen. Op raad van Cilliers begonnen de Boeren
nu hunne geweren met „loopers” te laden, waarvan er gelukkig een geruimen
voorraad in het lager was. Op den korten afstand waren deze van meer effect
dan de kogels, en de Zulu’s vonden dit spoedig uit. Zij deden nog één
wanhopige poging om de overwinning te behalen, doch tevergeefs. Toen
sloegen zij op de vlucht; een wilde vlucht, waar geen keeren meer aan was.
Ditmaal hielden zij niet meer stil op het randje; neen zij gingen het randje
over en de jongere krijgers volgden hen zoo snel hunne voeten hen konden
dragen. [126]
Charel Cilliers antwoordde niet. Hij knielde neder daar in het lager, en
zwijgend volgde een ieder, mannen, vrouwen en kinderen zijn voorbeeld. En
toen ging er een dankgebed op tot den God van Abraham, van Izaäk en van
Jakob, die ook de God der Boeren was, voor de overwinning aan de
belegerden geschonken, en de redding uit hunnen nood. De stem van den
eerwaardigen, dapperen grijsaard sidderde van ontroering, en diep gevoel,
terwijl hij het gebed deed en zijn nauw hoorbaar Amen ging verloren in het
krachtig Amen! van zijne volgelingen. Zoo vochten die oude Voortrekkers;
gedurende den strijd weerden zij zich als leeuwen; na den strijd was hun
eerste gedachte om den Heer de glorie te geven van de overwinning. [127]
[Inhoud]
HOOFDSTUK XII.
Een aantal diepe slooten werden toen spoedig gegraven, en daarin wierp
men de dooden, die toen met aarde en steenen bedekt werden. Hierop werd
het volk gezonden om het vee in den berg bij elkander te maken, en het terug
te brengen.
Toen de nacht viel deed Charel Cilliers sterke wachten op eenigen afstand
van het lager plaatsen, want men kon niet weten of de Zulu’s misschien geen
nachtelijken aanval zouden wagen. In het lager sliep ook elk man met het
geweer naast zich, en werden groote vuren den geheelen nacht
aangehouden. Doch de nacht ging rustig voorbij en geen vijand vertoonde
zich.
Den volgenden morgen vroeg liet Cilliers een dertigtal mannen opzadelen om
hem te begeleiden naar de andere kampen, want men was angstig omtrent
het lot der andere Emigranten. Toen men bij het kamp der Krugers kwam,
bevond men dat ook de bewoners daarvan den vorigen dag een harden strijd
hadden gehad, doch dat ook daar de Zulu’s waren afgeslagen, en dit met
verlies van slechts een doode en twee gewonden aan de zijde der Boeren.
Een aantal mannen uit dit kamp sloot zich bij Cilliers [129]aan, en men trok
naar het volgende lager, dat der De Klerks. Hier hadden de Boeren zwaar
geleden; een zestal hunner was gedood en achttien waren gewond, en ware
het niet dat het slechts een betrekkelijk gering aantal Zulu’s waren, die dit
kamp hadden aangevallen, dan was de uitslag, waarschijnlijk anders
geweest, want de ammunitie in dit kamp was juist aan het opraken, toen de
Zulu’s de vlucht namen.
Nadat ook hier een twintigtal mannen zich bij den trein aangesloten hadden,
vervolgde men in treurigheid, den weg naar het kamp der Botha’s; want hier
wist men was er geen kans geweest voor de Emigranten om zich te
verdedigen.
Het tooneel, dat zich dan ook hier voor de oogen van Cilliers en zijne
metgezellen vertoonde, was dan ook een uiterst treurige. Het kamp was eene
verwoesting. Gebroken en verbrande wagens lagen overal rond; de tenten
waren tegen den grond geslagen; het huisraad lag kort en fijn op den grond
en daartusschen lagen de lijken van mannen, vrouwen en kinderen allen
gedood door de vreeselijke steek-assegaai der Zulu’s. Eenenveertig mannen,
zesenvijftig vrouwen en eenhonderd vijfentachtig kinderen, allen blanken,
waren daar ternedergestrekt, en behalve hen nog tweehonderd drieenvijftig
kleurling-dienstboden. Een twintigtal Zulu’s hadden ook [130]het leven bij den
aanval ingeschoten. George Biggar, de jonge Engelschman van de Baai, die
gekomen was om bezigheid met de Boeren te doen, lag dood op een hoop
lijken. Het vreeselijkste van dit treurig schouwspel was dat een aantal dezer
lijken vreeselijk verminkt waren.
Een tijd lang stonden Cilliers en de zijnen in zwijgen dit alles aan te kijken.
Tranen rolden langs de wangen van de meest geharde Boeren; sommigen
weenden overluid. Maar spoedig begreep men dat het thans tijd van
handelen was. Een aantal graven werden tusschen de puinhoopen
uitgehaald, ten einde de laatste eer aan de verslagenen te bewijzen. De
zeilen der tenten werden stuk gesneden om als lijkdoeken te dienen, en
daarop begon men de lijken uit te zoeken, en ze zoo goed mogelijk in het zeil
te wikkelen.
David Malan was onder degenen, die met Cilliers waren gekomen, en hij
werkte hard samen. Hij was juist bezig om met een half dozijn anderen een
hoop lijken weg te dragen, toen hij op eens een zucht hoorde. Hij keek
nauwkeurig en luisterde. De zucht werd zacht herhaald, en scheen te komen
van een jong meisje dat onder de lijken lag.
„Hier is een vrouw, die nog leeft,” riep de jongeling verbaasd uit, en op dit
geroep kwamen er een tiental Boeren aangeloopen. [131]
Men haalde het meisje van onder de lijken weg. Zij was vreeselijk gewond en
had negentien assegaai steken ontvangen. Naast haar lag een tweede
meisje en ook zij haalde nog adem, hoewel zij eenentwintig wonden had.
Men haalde water voor de twee gewonden, maar zij waren niet in staat te
drinken. Charel Cilliers was thans nader gekomen met Gert Maritz, en zij
lieten uit een stukkene katel spoedig een draagbaar maken, en zonden de
arme gewonden naar het naastbijzijnde kamp. Hier werden zij verpleegd, en
de verwondering mijner lezers zal groot wezen, als ik hen hier vertel dat
beiden het leven behielden. De namen dezer meisjes waren Johanna van der
Merwe en Catharina Prinsloo.
Binnen weinige minuten waren zij bij de Boeren, [132]en nu bleken het drie
blanken en twee kleurlingen te zijn. De blanken waren de Eerwaarde Lindley,
zendeling in Natal, en Richard Wood, en John Cane twee der Engelschen die
in de Baai woonden. De kleurlingen waren hunne achterruiters. De
Eerwaarde Lindley, die Hollandsch sprak, vroeg naar den leider der Boeren,
en beiden Cilliers en Maritz traden voor.
„Ik zie dat gij hier een treurig tooneel hebt gehad,” zeide de heer Lindley, zijn
oog over de verwoesting latende gaan.
En daarop deelde de heer Lindley het verhaal van dien moord aan de
aanwezigen mede, zooals hij het vernomen had uit den mond van den heer
Owen de zendeling te Umkungunhlovu, die den dag na den moord gevlucht
was naar de zendelingsstatie bij de Baai.
Den dag na het verhaalde in het vorige hoofdstuk lieten Cilliers en Maritz de
andere lagers weten dat er op den daaropvolgenden dag eene groote
volksvergadering bij Retiefs lager zou worden gehouden, en dat daarna de
Eerwaarde Lindley godsdienstoefening zou houden.
„Vrienden, wij zijn heden bij elkander gekomen om over gewichtige zaken te
spreken. Het is nu zoowat een jaar geleden sinds wij de Kolonie verlieten, om
van de dwingelandij der Engelsche Regeering verlost te worden. Maanden
lang hebben wij rondgezworven en ten laatste scheen het alsof wij in dit
schoone land rust zouden vinden. Maar heden, hoe treurig is het niet met ons
gesteld. Onze geliefde Kommandant-Generaal ligt met zesenzestig onzer
broeders dood bij Dingaans kraal, en op een paar uur afstand liggen een
aantal onzer broeders en zusters die de slachtoffers van den Zulu-koning zijn
geworden. Gevaren omringen ons aan alle kanten, en de Heer slechts weet
of binnen een week een onzer nog levend zal zijn, want elk oogenblik kan de
geheele Zulu macht op ons zijn. Onder zulke omstandigheden moeten wij
thans beslissen wat ons te doen staat, en om de opinie van het volk te
hooren is deze vergadering bijeengeroepen.”
Een paar stemmen riepen uit: „Ons zeg ook zoo. Laat ons hier dit land
uitgaan.”
„Schaam jullie je niet?” riep Anna de Wet uit; „Is jullie mannen? Is daar niet
bloed gevallen, dat gewroken moet worden? Zal jullie nou weggaan, en zal
Pieter Retief en al onze mannen en kinderen daar bij Dingaans kraal liggen
en om wraak schreeuwen naar den Goeden God? En zullen al die menschen
bij Bushmansrivier vermoord zijn, en zal jullie niets doen om hunne
moordenaars te straffen? Foei, Jan Grobbelaar, jij is een lafaard, en die wat
saâm met jou schreeuw ook. Loopt! gaat terug! jullie mans, naar de Kolonie;
wij vrouwens zullen hier [138]blijven, en wij zullen zelf onze mans en
bloedverwanten wreken.”
„Vrienden, ik ben een oude man, en ik heb veel in de wereld doorleefd, maar
steeds heb ik een ding bevonden, en dat is, dat wij allen in de hand Gods
zijn, en moeten buigen onder Zijnen wil. Wat de Heer doet is welgedaan, en
drukt Zijn hand zwaar op ons, en kastijdt Hij ons dan doet Hij zulks om ons te
straffen voor onze zonden, en ons tot bekeering te brengen. God heeft ons
en ons volk thans zwaar beproefd, maar wie zal zeggen dat wij het niet
verdiend hebben? Wie kan de menigte onzer zonden tellen? Doch de Heer
kent die allen. Maar laten wij ons nederbuigen voor den Almachtigen, en
laten wij Hem ootmoedig om vergiffenis vragen voor onze vele zonden, en
God, die de Israëlieten in hunne diepste ellende niet verlaten heeft, zal ons
ook niet verlaten, en de heidenen niet over ons laten triomfeeren. [139]Laat
ons thans tot God bidden, en Oom Charel zal ons in het gebed voorgaan.”
en men zong toen het eerste en het vierde vers van dat heilig gedicht.
Nadat eenige tijd zwijgend en stil was voorbijgegaan, gedurende welke een
ieder met zijn gedachten scheen bezig te zijn, nam Cilliers weder het woord.
„Mannen, broeders,” zoo sprak hij: „ik wil u mijn gevoelens omtrent deze zaak
in het kort mededeelen. Ik zelf gevoel dat wij dit land thans niet kunnen
verlaten, zonder het bloed onzer geliefden gewroken te hebben. Doch wij zijn
thans te zwak om tegen Dingaan op te rukken. Daarom zal ik voorstellen
[140]dat boden worden gezonden naar onze vrienden en broeders te Winburg.
Toen wij vertrokken van Winburg, zeiden beide Kommandanten Potgieter en
Uys, dat, als wij hen ooit noodig hadden zij ons zouden komen helpen, en ik
ben zeker, dat als zij hooren in welken toestand wij zijn, zij dadelijk met alle
beschikbare macht zullen overkomen. Ondertusschen echter moeten wij nog
iets doen, en dat is wij moeten een Kommandant kiezen, want Retief is
helaas! er niet meer om ons aan te voeren en te leiden. Ik beschouw dat er
niemand beter geschikt is om Retiefs plaats in te nemen dan de heer Gert
Maritz en daarom zal ik hem als Kommandant voorstellen. Als er natuurlijk
andere voorstellen zijn, dan kunnen die thans gemaakt worden.”
De heer John Cane, die gebroken Hollandsch sprak, vroeg toen verlof om
een paar woorden te zeggen en toen dit hem toegestaan werd, verklaarde
[141]hij, dat indien de Emigranten tegen Dingaan wilden optrekken, hij en de
andere Engelschen in de Baai gereed waren om hen te helpen, en dat zij met
een sterke macht der hun onderhoorige kleurlingen naar Umkungunhlovu
zouden gaan van de eene zijde, terwijl de Boeren dit van de andere zijde
konden doen, op die wijze zou men Dingaans macht verdeelen en zou hij
gemakkelijker overwonnen worden.
Charel Cilliers bedankte den heer Cane voor zijn edelmoedig offer, en men
besloot om zoodra men gereed was, de Engelschen in de Baai te doen
weten wanneer men tegen Dingaan zou optrekken.
Na afloop der godsdienstige plechtigheid, ging David Malan naar oom Gert
Maritz, en vroeg of de Eerw. Lindley ook huwelijken kon inzegenen.
„Ja David,” antwoordde Maritz, „ik zie niet in waarom hij dit niet zou kunnen
doen, als hij net die formulier van onze kerk volgt. Dit is goed dat je daarover
praat, want ik weet van een paar andere paren die ook willen trouwen, en ik
zal er met oom Charel en nog een paar broeders over praten.”
„Dit is goed, oom,” zeide David, „maar oom moet toch als het u belieft niet
zeggen dat ik met oom er over gesproken heb.”
Vroeg den volgenden morgen reden twee troepjes ruiters het lager uit in
verschillende richtingen. De heer Lindley en de zijnen reden zuidwaarts, en
vier jonge Boeren met vier achterruiters, en eenige handpaarden, sloegen
den noordelijken weg in over de Drakensbergen naar Winburg. [143]
[Inhoud]
HOOFDSTUK XIV.
Potgieter en Uys deden niet lang naar zich wachten. Nauwelijks hadden zij
de brieven van hunne stamgenooten ontvangen, of zij maakten zich voor den
tocht gereed, en het viel hun geenszins moeielijk om de noodige
manschappen bij elkander te krijgen. Tweehonderd fluksche kerels waren in
een oogwenk gereed om hen te vergezellen en contributies in kruid en lood
als ook geweren werden in menigte aangeboden. Daar er onder de Boeren
aan de Natalzijde gebrek aan meel was, nam men ook een goede
hoeveelheid er van samen, en zoo gebeurde het dat zeven wagens met de
expeditie samen gingen. [144]
Op den 17den Maart kwam de Eerw. Lindley inderdaad naar het lager terug,
en nog dienzelfden avond hield hij kerk. Voor hij echter de
godsdienstoefening begon gaf hij kennis, dat de volgende paren zich in het
huwelijk wilden begeven (hier las hij de namen van zes paartjes voor), en dat
zoo iemand eenige objecties had tegen zulke huwelijken hij of zij daar en dan
moest opstaan, en de objecties opgeven. Doch niemand was er, die objecties
had en daarop stond Gert Maritz op en verklaarde, dat namens het volk der
Emigranten hij toestemming tot de huwelijken gaf. Deze eenvoudige wijze
volgde men, daar de toestanden niet geschikt waren voor het loopen van drie
geboden, zooals de oude wet eigenlijk vereischte.
Den volgenden morgen om tien ure was er een heel leven in het lager, om de
inzegeningen der huwelijken te zien, en wij, die thans zoo hoog op onze
[147]beschaafdheid en (ik wou bijna zeggen Engelsche) manieren roemen,
zouden zeker heel wat gelachen hebben om de kleedij van bruidegoms en
bruids. Doch dat kwam er niet op aan; de liefde was er toen even goed (en
misschien in zuiverder mate) als zij er thans is.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
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.
ebookfinal.com