100% found this document useful (1 vote)
5 views

Programming in Lua 2nd Edition Roberto Ierusalimschy pdf download

The document provides information about the book 'Programming in Lua, 2nd Edition' by Roberto Ierusalimschy, including its digital download link, ISBN, and a brief overview of its content. It covers various aspects of the Lua programming language, such as types, functions, data structures, and libraries, aimed at both beginners and experienced programmers. Additionally, it highlights Lua's extensibility, simplicity, efficiency, and portability as key features that make it a popular choice for various applications.

Uploaded by

meihuashames
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
5 views

Programming in Lua 2nd Edition Roberto Ierusalimschy pdf download

The document provides information about the book 'Programming in Lua, 2nd Edition' by Roberto Ierusalimschy, including its digital download link, ISBN, and a brief overview of its content. It covers various aspects of the Lua programming language, such as types, functions, data structures, and libraries, aimed at both beginners and experienced programmers. Additionally, it highlights Lua's extensibility, simplicity, efficiency, and portability as key features that make it a popular choice for various applications.

Uploaded by

meihuashames
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Programming in Lua 2nd Edition Roberto

Ierusalimschy pdf download

https://ebookfinal.com/download/programming-in-lua-2nd-edition-
roberto-ierusalimschy/

Explore and download more ebooks or textbooks


at ebookfinal.com
Here are some recommended products for you. Click the link to
download, or explore more at ebookfinal

Programming in Lua 3rd Edition Roberto Ierusalimschy

https://ebookfinal.com/download/programming-in-lua-3rd-edition-
roberto-ierusalimschy/

Beginning Lua Programming 1st Edition Jung

https://ebookfinal.com/download/beginning-lua-programming-1st-edition-
jung/

LÖVE for Lua Game Programming 1st Edition Akinlaja

https://ebookfinal.com/download/love-for-lua-game-programming-1st-
edition-akinlaja/

Programming in Haskell 2nd Edition Graham Hutton

https://ebookfinal.com/download/programming-in-haskell-2nd-edition-
graham-hutton/
C Programming in Linux 2nd Edition David Haskins

https://ebookfinal.com/download/c-programming-in-linux-2nd-edition-
david-haskins/

Elements of Programming Interviews in Java 2nd Edition


Adnan Aziz

https://ebookfinal.com/download/elements-of-programming-interviews-in-
java-2nd-edition-adnan-aziz/

Programming iOS 5 2nd Edition Matt Neuburg

https://ebookfinal.com/download/programming-ios-5-2nd-edition-matt-
neuburg/

Asynchronous Android Programming 2nd Edition Helder


Vasconcelos

https://ebookfinal.com/download/asynchronous-android-programming-2nd-
edition-helder-vasconcelos/

Under Her Spell Roberto Rossellini in India 1st Edition


Dileep Padgaonkar

https://ebookfinal.com/download/under-her-spell-roberto-rossellini-in-
india-1st-edition-dileep-padgaonkar/
Programming in Lua 2nd Edition Roberto Ierusalimschy
Digital Instant Download
Author(s): Roberto Ierusalimschy
ISBN(s): 9788590379829, 8590379825
Edition: 2
File Details: PDF, 1.58 MB
Year: 2006
Language: english
Programming ROBERTO IERUSALIMSCHY

in
Lua

2nd
edition

Lua.org

Last update: Wed Jan 13 12:07:33 UTC 2010


Programming in Lua

Property of Ian Bloss <ianlinkcd@gmail.com>


Property of Ian Bloss <ianlinkcd@gmail.com>
Programming in Lua
Second Edition

Roberto Ierusalimschy
PUC-Rio, Brazil

Lua.org

Rio de Janeiro

Property of Ian Bloss <ianlinkcd@gmail.com>


Programming in Lua, Second Edition
by Roberto Ierusalimschy

ISBN 85-903798-2-5

Copyright c 2006, 2003 by Roberto Ierusalimschy. All rights reserved.

The author can be contacted at roberto@lua.org.

Book cover and illustrations by Dimaquina. Lua logo design by Alexandre Nako.
Typesetting by the author using LATEX.

Although the author used his best efforts preparing this book, he assumes no
responsibility for errors or omissions, or for any damage that may result from
the use of the information presented here. All product names mentioned in this
book are trademarks of their respective owners.

CIP – Biblioteca do Departamento de Informática, PUC-Rio


Ierusalimschy, Roberto
I22 Programming in Lua / Roberto Ierusalimschy. – 2nd ed.
– Rio de Janeiro, 2006.
xviii, 308 p. : 25 cm.
Includes index.
ISBN 85-903798-2-5
1. Lua (Programming language). I. Title.
005.133 – dc20

Property of Ian Bloss <ianlinkcd@gmail.com>


to Ida, Noemi, and Ana Lucia

Property of Ian Bloss <ianlinkcd@gmail.com>


Property of Ian Bloss <ianlinkcd@gmail.com>
Contents

Preface xiii

I The Language 1

1 Getting Started 3
1.1 Chunks 4
1.2 Some Lexical Conventions 5
1.3 Global Variables 6
1.4 The Stand-Alone Interpreter 7

2 Types and Values 9


2.1 Nil 10
2.2 Booleans 10
2.3 Numbers 10
2.4 Strings 11
2.5 Tables 13
2.6 Functions 17
2.7 Userdata and Threads 17

3 Expressions 19
3.1 Arithmetic Operators 19
3.2 Relational Operators 20
3.3 Logical Operators 21
3.4 Concatenation 22
3.5 Precedence 22
3.6 Table Constructors 22

vii

Property of Ian Bloss <ianlinkcd@gmail.com>


viii Contents

4 Statements 27
4.1 Assignment 27
4.2 Local Variables and Blocks 28
4.3 Control Structures 30
4.4 break and return 34

5 Functions 35
5.1 Multiple Results 36
5.2 Variable Number of Arguments 39
5.3 Named Arguments 42

6 More About Functions 45


6.1 Closures 47
6.2 Non-Global Functions 50
6.3 Proper Tail Calls 52

7 Iterators and the Generic for 55


7.1 Iterators and Closures 55
7.2 The Semantics of the Generic for 57
7.3 Stateless Iterators 58
7.4 Iterators with Complex State 60
7.5 True Iterators 61

8 Compilation, Execution, and Errors 63


8.1 Compilation 63
8.2 C Code 67
8.3 Errors 67
8.4 Error Handling and Exceptions 69
8.5 Error Messages and Tracebacks 70

9 Coroutines 73
9.1 Coroutine Basics 73
9.2 Pipes and Filters 76
9.3 Coroutines as Iterators 79
9.4 Non-Preemptive Multithreading 81

10 Complete Examples 87
10.1 Data Description 87
10.2 Markov Chain Algorithm 91

II Tables and Objects 95


11 Data Structures 97
11.1 Arrays 97

Property of Ian Bloss <ianlinkcd@gmail.com>


ix

11.2 Matrices and Multi-Dimensional Arrays 98


11.3 Linked Lists 100
11.4 Queues and Double Queues 100
11.5 Sets and Bags 101
11.6 String Buffers 103
11.7 Graphs 104

12 Data Files and Persistence 107


12.1 Data Files 107
12.2 Serialization 109

13 Metatables and Metamethods 117


13.1 Arithmetic Metamethods 118
13.2 Relational Metamethods 120
13.3 Library-Defined Metamethods 122
13.4 Table-Access Metamethods 122

14 The Environment 129


14.1 Global Variables with Dynamic Names 129
14.2 Global-Variable Declarations 131
14.3 Non-Global Environments 132

15 Modules and Packages 137


15.1 The require Function 138
15.2 The Basic Approach for Writing Modules 141
15.3 Using Environments 143
15.4 The module Function 144
15.5 Submodules and Packages 145

16 Object-Oriented Programming 149


16.1 Classes 151
16.2 Inheritance 152
16.3 Multiple Inheritance 154
16.4 Privacy 156
16.5 The Single-Method Approach 158

17 Weak Tables 161


17.1 Memoize Functions 163
17.2 Object Attributes 164
17.3 Revisiting Tables with Default Values 165

III The Standard Libraries 167


18 The Mathematical Library 169

Property of Ian Bloss <ianlinkcd@gmail.com>


x Contents

19 The Table Library 171


19.1 Insert and Remove 171
19.2 Sort 172
19.3 Concatenation 173

20 The String Library 175


20.1 Basic String Functions 175
20.2 Pattern-Matching Functions 177
20.3 Patterns 180
20.4 Captures 183
20.5 Replacements 185
20.6 Tricks of the Trade 189

21 The I/O Library 193


21.1 The Simple I/O Model 193
21.2 The Complete I/O Model 196
21.3 Other Operations on Files 199

22 The Operating System Library 201


22.1 Date and Time 201
22.2 Other System Calls 203

23 The Debug Library 205


23.1 Introspective Facilities 205
23.2 Hooks 210
23.3 Profiles 211

IV The C API 215


24 An Overview of the C API 217
24.1 A First Example 218
24.2 The Stack 221
24.3 Error Handling with the C API 225

25 Extending Your Application 229


25.1 The Basics 229
25.2 Table Manipulation 231
25.3 Calling Lua Functions 235
25.4 A Generic Call Function 236

26 Calling C from Lua 241


26.1 C Functions 241
26.2 C Modules 244

Property of Ian Bloss <ianlinkcd@gmail.com>


xi

27 Techniques for Writing C Functions 247


27.1 Array Manipulation 247
27.2 String Manipulation 249
27.3 Storing State in C Functions 251

28 User-Defined Types in C 259


28.1 Userdata 260
28.2 Metatables 262
28.3 Object-Oriented Access 265
28.4 Array Access 267
28.5 Light Userdata 268

29 Managing Resources 269


29.1 A Directory Iterator 269
29.2 An XML Parser 271

30 Threads and States 281


30.1 Multiple Threads 281
30.2 Lua States 285

31 Memory Management 293


31.1 The Allocation Function 293
31.2 The Garbage Collector 295

Index 299

Property of Ian Bloss <ianlinkcd@gmail.com>


Property of Ian Bloss <ianlinkcd@gmail.com>
Preface

When Waldemar, Luiz, and I started the development of Lua, back in 1993, we
could hardly imagine that it would spread as it did. Started as an in-house
language for two specific projects, currently Lua is widely used in all areas that
can benefit from a simple, extensible, portable, and efficient scripting language,
such as embedded systems, mobile devices, web servers, and, of course, games.
We designed Lua, from the beginning, to be integrated with software written
in C and other conventional languages. This integration brings many benefits.
Lua is a tiny and simple language, partly because it does not try to do what C is
already good for, such as sheer performance, low-level operations, and interface
with third-party software. Lua relies on C for these tasks. What Lua does
offer is what C is not good for: a good distance from the hardware, dynamic
structures, no redundancies, ease of testing and debugging. For this, Lua has
a safe environment, automatic memory management, and good facilities for
handling strings and other kinds of data with dynamic size.
A great part of the power of Lua comes from its libraries. This is not by
chance. After all, one of the main strengths of Lua is its extensibility. Many fea-
tures contribute to this strength. Dynamic typing allows a great degree of poly-
morphism. Automatic memory management simplifies interfaces, because there
is no need to decide who is responsible for allocating and deallocating memory,
or how to handle overflows. Higher-order functions and anonymous functions
allow a high degree of parameterization, making functions more versatile.
More than an extensible language, Lua is also a glue language. Lua sup-
ports a component-based approach to software development, where we create
an application by gluing together existing high-level components. These com-
ponents are written in a compiled, statically typed language, such as C or C++;
Lua is the glue that we use to compose and connect these components. Usually,
the components (or objects) represent more concrete, low-level concepts (such as
widgets and data structures) that are not subject to many changes during pro-
gram development, and that take the bulk of the CPU time of the final program.
Lua gives the final shape of the application, which will probably change a lot
during the life cycle of the product. However, unlike other glue technologies,
Lua is a full-fledged language as well. Therefore, we can use Lua not only to

xiii

Property of Ian Bloss <ianlinkcd@gmail.com>


xiv Preface

glue components, but also to adapt and reshape them, and to create whole new
components.
Of course, Lua is not the only scripting language around. There are other
languages that you can use for more or less the same purposes. But Lua offers
a set of features that makes it your best choice for many tasks and gives it a
unique profile:
Extensibility: Lua’s extensibility is so remarkable that many people regard Lua
not as a language, but as a kit for building domain-specific languages. Lua
has been designed from scratch to be extended, both through Lua code and
through external C code. As a proof of concept, Lua implements most of
its own basic functionality through external libraries. It is really easy to
interface Lua with C/C++, and Lua has been used integrated with several
other languages as well, such as Fortran, Java, Smalltalk, Ada, C#, and
even with other scripting languages, such as Perl and Ruby.
Simplicity: Lua is a simple and small language. It has few (but powerful)
concepts. This simplicity makes Lua easy to learn and contributes to its
small size. Its complete distribution (source code, manual, plus binaries
for some platforms) fits comfortably in a floppy disk.
Efficiency: Lua has a quite efficient implementation. Independent benchmarks
show Lua as one of the fastest languages in the realm of scripting (inter-
preted) languages.
Portability: When we talk about portability, we are not talking about running
Lua both on Windows and on Unix platforms. We are talking about run-
ning Lua on all platforms we have ever heard about: PlayStation, XBox,
Mac OS-9 and OS X, BeOS, QUALCOMM Brew, MS-DOS, IBM main-
frames, RISC OS, Symbian OS, PalmOS, ARM processors, Rabbit proces-
sors, plus of course all flavors of Unix and Windows. The source code for
each of these platforms is virtually the same. Lua does not use conditional
compilation to adapt its code to different machines; instead, it sticks to
the standard ANSI (ISO) C. This way, you do not usually need to adapt it
to a new environment: if you have an ANSI C compiler, you just have to
compile Lua, out of the box.

Audience
Lua users typically fall into three broad groups: those that use Lua already
embedded in an application program, those that use Lua stand alone, and those
that use Lua and C together.
Many people use Lua embedded in an application program, such as CGILua
(for building dynamic Web pages) or a game. These applications use the Lua–
C API to register new functions, to create new types, and to change the behavior
of some language operations, configuring Lua for their specific domains. Fre-
quently, the users of such applications do not even know that Lua is an inde-
pendent language adapted for a particular domain; for instance, CGILua users

Property of Ian Bloss <ianlinkcd@gmail.com>


xv

tend to think of Lua as a language specifically designed for the Web; players of
a specific game may regard Lua as a language exclusive to that game.
Lua is useful also as a stand-alone language, not only for text-processing
and one-shot little programs, but increasingly for medium-to-large projects, too.
For such uses, the main functionality of Lua comes from libraries. The stan-
dard libraries offer pattern matching and other functions for string handling.
(We may regard the stand-alone language as the embedding of Lua into the
domain of string and text-file manipulation.) As Lua improves its support for li-
braries, there has been a proliferation of external packages. The Kepler project
(http://www.keplerproject.org), for instance, is a Web development platform
for Lua that offers packages for page generation, database access, LDAP, XML,
and SOAP. The LuaForge site (http://www.luaforge.net) offers a focal point
for many Lua packages.
Finally, there are those programmers that work on the other side of the
bench, writing applications that use Lua as a C library. Those people will
program more in C than in Lua, although they need a good understanding of
Lua to create interfaces that are simple, easy to use, and well integrated with
the language.
This book has much to offer to all these people. The first part covers the
language itself, showing how we can explore all its potential. We focus on
different language constructs and use numerous examples to show how to use
them for practical tasks. Some chapters in this part cover basic concepts, such
as control structures, but there are also advanced topics, such as iterators and
coroutines.
The second part is entirely devoted to tables, the sole data structure in Lua.
Its chapters discuss data structures, persistence, packages, and object-oriented
programming. There we will unveil the real power of the language.
The third part presents the standard libraries. This part is particularly
useful for those that use Lua as a stand-alone language, although many other
applications also incorporate all or part of the standard libraries. This part
devotes one chapter to each standard library: the mathematical library, the table
library, the string library, the I/O library, the operating system library, and the
debug library.
Finally, the last part of the book covers the API between Lua and C, for those
that use C to get the full power of Lua. This part necessarily has a flavor quite
different from the rest of the book. There we will be programming in C, not
in Lua; therefore, we will be wearing a different hat. For some readers, the
discussion of the C API may be of marginal interest; for others, it may be the
most relevant part of this book.

About the Second Edition


This book is an updated and expanded version of the first edition of Program-
ming in Lua (also known as the PiL book). Although the book structure is virtu-
ally the same, this new edition has substantial new material.

Property of Ian Bloss <ianlinkcd@gmail.com>


xvi Preface

First, I have updated the whole book to Lua 5.1. Of particular relevance is
the chapter about modules and packages, which was mostly rewritten. I also
rewrote several examples to show how to benefit from the new features offered
by Lua 5.1. Nevertheless, I clearly marked features absent from Lua 5.0, so you
can use the book for that version too.
Second, there are several new examples. These examples cover graph rep-
resentation, tab expansion and compression, an implementation for tuples, and
more.
Third, there are two complete new chapters. One is about how to use multiple
states and multiple threads from C; it includes a nice example of how to imple-
ment a multi-process facility for Lua. The other is about memory management
and how to interact with memory allocation and garbage collection.
After the release of the first edition of Programming in Lua, several publish-
ers contacted us showing interest in a second edition. In the end, however, we
decided to self publish this second edition, as we did with the first one. Despite
the limited marketing, this avenue brings several benefits: we have total con-
trol over the book contents, we have freedom to choose when to release another
edition, we can ensure that the book does not go out of print, and we keep the
full rights to offer the book in other forms.

Other Resources
The reference manual is a must for anyone who wants to really learn a language.
This book does not replace the Lua reference manual. Quite the opposite, they
complement each other. The manual only describes Lua. It shows neither
examples nor a rationale for the constructs of the language. On the other hand,
it describes the whole language; this book skips over seldom-used dark corners of
Lua. Moreover, the manual is the authoritative document about Lua. Wherever
this book disagrees with the manual, trust the manual. To get the manual and
more information about Lua, visit the Lua site at http://www.lua.org.
You can also find useful information at the Lua users site, kept by the
community of users at http://lua-users.org. Among other resources, it offers
a tutorial, a list of third-party packages and documentation, and an archive of
the official Lua mailing list. You should check also the book’s web page:

http://www.inf.puc-rio.br/~roberto/pil2/

There you can find updated errata, code for some of the examples presented in
the book, and some extra material.
This book describes Lua 5.1, although most of its contents also apply to
Lua 5.0. The few differences between Lua 5.1 and Lua 5.0 are clearly marked in
the text. If you are using a more recent version, check the corresponding manual
for occasional differences between versions. If you are using a version older than
5.0, this is a good time to upgrade.

Property of Ian Bloss <ianlinkcd@gmail.com>


xvii

A Few Typographical Conventions


The book encloses “literal strings” between double quotes and single charac-
ters, like ‘a’, between single quotes. Strings that are used as patterns are also
enclosed between single quotes, like ‘[%w_]*’. The book uses a typewriter font
both for little chunks of code and for identifiers. Larger chunks of code are
shown in display style:
-- program "Hello World"
print("Hello World") --> Hello World
The notation --> shows the output of a statement or, occasionally, the result of
an expression:
print(10) --> 10
13 + 3 --> 16
Because a double hyphen (--) starts a comment in Lua, there is no problem
if you include these annotations in your programs. Finally, the book uses the
notation <--> to indicate that something is equivalent to something else:

this <--> that


That is, it makes no difference to Lua whether you write this or that.

Acknowledgments
This book would be impossible without the help of several friends and institu-
tions. As always, Luiz Henrique de Figueiredo and Waldemar Celes, Lua co-
developers, offered all kinds of help.
Gavin Wraith, André Carregal, Asko Kauppi, Brett Kapilik, John D. Rams-
dell, and Edwin Moragas reviewed drafts of this book and provided invaluable
suggestions.
Lightning Source, Inc. proved a reliable and efficient option for printing and
distributing the book. Without them, the option of self-publishing the book
would probably not be an option.
Antonio Pedro, from Dimaquina, patiently endured my shifting opinions and
produced the right cover design.
Norman Ramsey kindly provided useful insights about the best way to pub-
lish this book.
I also would like to thank PUC-Rio and CNPq for their continuous support
to my work.
Finally, I must express my deep gratitude to Noemi Rodriguez, for illumining
my life.

Property of Ian Bloss <ianlinkcd@gmail.com>


Property of Ian Bloss <ianlinkcd@gmail.com>
Part I
The Language

Property of Ian Bloss <ianlinkcd@gmail.com>


Discovering Diverse Content Through
Random Scribd Documents
The mouth of the canyon did not seem to be so very large, after
they came to look at it awhile, and Bob’s companions were much
surprised when he told them that, according to his father’s
measurements, it was four hundred feet wide, and more than half as
high.
It was shrouded in an impenetrable darkness, and not a sound
came forth from its depths. Swiftly and silently the river sped on its
way, and so smooth and deep was its channel, so free from hidden
rocks and every other obstruction, that there was not even the
smallest ripple on its surface.
“I’ll tell you what’s a fact,” said George, who had been awed into
silence by the terrific grandeur of the scene. “If I had just half a grain
more of superstition, I could put full faith in that Indian legend.”
“His story fits the place pretty well,” answered Bob, “and in
making it up he did better than any white man can do—he accounted
for everything in a way that was perfectly satisfactory to himself.
How do you suppose he knew that there was a time when this valley
was all under water?”
“He didn’t know it,” replied George. “He only guessed it.”
“And geology bears him out in his guess,” said Bob. “If you are
persevering and enduring enough to climb about half-way up some
of these cliffs—as a party of Eastern college students did a few years
ago—you will find shells that were left there when the water
receded.”
“If a fellow got into this current, he wouldn’t have much show for
his life, would he?” said Arthur, who marveled greatly at the rapidity
with which the sticks he threw into the water disappeared in the
black mouth of the canyon.
“He might as well be in the rapids at Niagara Falls,” answered Bob.
“Now, while I think of it, I want to give you two a word of caution and
advice: The lake and the river above it, as far up as the falls, are
perfectly safe for boating and bathing, but this end of the stream will
be the death of the first person who ventures upon it, I don’t care
how good a boatman he may be. So, when you go out on the river,
remember that constant vigilance is the price of your life; and do not,
under any circumstances, allow the current to carry your boat below
that big cottonwood you see up there on the opposite bank.”
Having taken a good look at the canyon, the boys bent their steps
toward the rancho. As they were passing through the grove, they met
a roughly-dressed but intelligent-looking man, who greeted Bob
cordially, and was introduced to George and Arthur as Mr. Jacobs,
the superintendent.
He had had full charge of the ranch ever since it was started, and
that he cherished a deep-rooted affection for his late employer, and
anything but kindly feelings for those who had come there to take his
place, was made very plain by his actions.
He greeted Arthur coolly, and did not offer to shake hands with
him, but when he spoke to Bob of his father the tears came into his
eyes.
After telling the boy how glad he was to see him again, and how
deeply he sympathized with him in the great loss he had sustained,
he began talking about the affairs of the ranch. At length he said
abruptly:
“By-the-way, Sam has come back again.”
“He has!” exclaimed Bob, in a tone of disgust. “What does he
want?”
“He wants a job of herding sheep,” answered the superintendent.
“Well, he can’t have it! We don’t want any such men as he is. I
thought my father told him never to show his face about here again.”
“So he did, but Sam knows that your father is not here now to drive
him away.”
“That doesn’t make any difference. I am here, and my father’s
wishes shall be respected. This Sam is a bad fellow,” said Bob,
turning to his companions. “He and three other cowboys once rode
into Dixon Springs and began shooting right and left at everybody
they saw on the streets.”
“What did they do that for?” asked George.
“They did it out of pure bravado—nothing else—for the citizens
hadn’t done anything to them.”
“Why didn’t they arrest them?” inquired Arthur.
“Arrest them!” repeated Bob, smiling at Mr. Jacobs, who smiled in
return. “They couldn’t, and besides that isn’t the way things are done
in this country. The citizens returned the fire, killed two of the
cowboys and captured another, whom they hanged to the nearest
tree. Sam was the only one who escaped. Of course father discharged
him at once, and Sam sent him word that he was waiting for a chance
to take vengeance on him. Now he has the impudence to come back
here and ask for a job. Kick him off the ranch, Mr. Jacobs.”
“I don’t think it would be quite safe to attempt that, Bob,” said the
superintendent. “Sam’s temper is rather uncertain, and he is very
fond of using his revolver; but, if you say so, I’ll not give him work.”
“I do say so, certainly. I don’t want him around.”
“All right. And I say, Bob,” added the superintendent, in a lower
tone, “we can’t get rid of him until he chooses to go, and, while he is
hanging about here, I would be a little careful of myself, if I were in
your place. Sam is treacherous and vindictive, and there is no telling
what he may make up his mind to do.”
Mr. Jacobs went off about his business, and the three boys kept on
to the ranch. When they reached it, Bob and George went to their
room to overhaul their fishing-tackle, preparatory to a day’s sport on
the lake, while Arthur lingered on the porch. He wanted to see Sam.
CHAPTER XXIII.
OFF FOR CAMP.

“I think Bob is taking a good deal upon himself when he presumes


to say who shall be employed on this ranch, and who shall not,”
said Arthur to himself. “He has no right to open his head. My father
is boss here now, and Bob and Mr. Jacobs will find it out before they
are many days older. I wonder if that’s Sam?”
While these thoughts were passing through Arthur’s mind, he was
walking slowly along the porch. As he turned the corner of the
building, he saw a broad-shouldered, smooth-faced young fellow,
leaning against a door-casing, and talking with somebody in the
kitchen.
He did not look like one who would risk his life by raiding a town
of a thousand inhabitants, “just for the fun of the thing;” but still,
there was something about him which told Arthur that he was the
man he wanted to see.
The earnest manner in which Bob had cautioned him and George
Edwards to beware of the current in the river, and the
superintendent’s words of warning, had suggested an idea to Arthur,
and it had suddenly occurred to him that Sam would be just the man
to assist him in carrying it into execution.
“Bob and George are going over to the other side of the lake to-
morrow, to spend two or three days in camp,” he had said to himself.
“And if, while they are going up the river, their oars should break and
their boat should float down into the current, why, then—”
He did not follow out this train of thought, for it frightened him;
but it was easy enough to tell what he looked forward to.
As Arthur approached, the smooth-faced young fellow bowed to
him very civilly; and that was more respect than any other person
about the ranch had yet shown him.
All those to whom he and his father had been introduced seemed
to look upon them as interlopers, and would not even shake hands
with them; but this man was polite, if he was a desperado.
“Are you Sam?” asked Arthur.
“That’s what they call me, when they tell me that dinner is ready,”
was the simple reply.
“You are one of the men who raided Dixon Springs a while ago, I
believe?” continued Arthur, who saw that Sam was waiting to hear
what he had to say next.
The man replied that he was, and he did not appear to be at all
ashamed of it either. On the contrary, one would have thought, from
the way he answered the question, that he was rather proud of his
exploit.
“What did you do it for?” Arthur wanted to know.
“Oh, just to see what we could make out of it. A fellow needs some
sort of excitement to stir up his blood once in a while, you know.”
Arthur walked toward the farther end of the porch, and Sam who
showed himself to be quite willing to continue the conversation,
turned away from the door and went with him.
“I am Arthur Howard,” said the youth, as soon as they were out of
earshot of the man in the kitchen.
“So I supposed. You and your father have come here to take charge
of the ranch, haven’t you? Well, I will tell you, for your satisfaction,
that you are not wanted here.”
“I know it! It has been made very plain to me since my arrival,
about three hours ago. But I don’t see how these men are going to
help themselves. The estate is willed to my father, to be held in trust
until my cousin Bob is twenty-one years of age, and we are going to
stay and run things to suit ourselves—that’s all there is about that!
You are not wanted here, either, if you only knew it. Bob says you
shan’t have employment on the ranch.”
“He does, does he?” said Sam, his eyes flashing with anger. “He
wants to be careful. If he knows when he is well off, he will have little
to say about me. I’ll pitch him into the river and let the current take
him down to the Lost Canyon, the first thing he knows.”
“He told Mr. Jacobs, in my hearing, that he wouldn’t have any
such man as you on the place,” declared Arthur. “He said that the
fact that his father wasn’t here to drive you away, wouldn’t make any
difference. He doesn’t want you around.”
Sam looked mad, but said nothing.
“But neither Bob nor Mr. Jacobs has a word to say in regard to the
way this ranch shall be conducted,” added Arthur. “My father is the
head man, now, and they will find that he knows how to assert his
authority, too. You look like a good fellow, and I don’t see why you
shouldn’t stay here if you want to.”
“I am good enough to those who treat me well,” answered Sam. “I
stand by those who use me right, and serve them in any way I can,
but anybody who riles me wants to give me plenty of elbow-room.
Your father would step into quite a nice little property if Bob was
only out of the way, wouldn’t he?” added Sam, abruptly.
This was the beginning of a long conversation between these two
worthies; but we need not stop to repeat it, for the results of it will
speedily be developed. It will be enough to say that when the
conference was ended, Sam walked off with the assurance that he
should have employment on the ranch as long as he cared to stay
there, while Arthur went into the house and made his way to his
room, taking with him a face that was pale with excitement and
alarm.
“I didn’t suggest it,” thought he, laying his hand on his heart,
which thumped loudly against his ribs. “Sam proposed it himself. He
takes all the risk. But if it should ever be found out—great Scott! I
wish I hadn’t given my consent to it.”
Arthur paced up and down the floor, wringing his hands, and
giving other indications of a very agitated state of mind; but he made
no effort whatever to undo the wrong to which he was a silent but
willing accessory. He was so terribly frightened, and trembled so
violently in every limb, that he dared not go to supper, pleading a
headache as an excuse for his non-appearance. He went to bed at
dark, but not to sleep. He lay there, tossing restlessly about, until he
was called up to witness a scene the memory of which went with him
to his dying day.
Meanwhile, Bob and George were busy with their hunting and
fishing outfits—wiping out rifles and shotguns, critically examining
flies and leaders, and making all the other preparations necessary for
their sojourn in camp.
The only weapon that Bob intended to take with him was a three-
barreled Baker gun (two shot barrels, with a rifle barrel underneath),
that had once belonged to his father; while George was to use the
little fowling-piece he had brought up from the bottom of the lake,
and a heavy, muzzle-loading rifle that had bowled over more than
one lordly elk on his native heath.
Bob had spent an hour or more in loading shells, and, when he got
through, the Creedmoor cartridge-case he placed upon the table was
about as heavy a weight as he cared to lift.
“Why, Bob, what makes you take so much ammunition?” asked
George, casting aside a frayed leader that had parted while he was
testing its strength. “We can’t use it all up in two days. One would
think that we were going off on a regular campaign.”
“So we are. We shall have need of every cartridge in this case
before we come back,” replied Bob, little dreaming how true were the
words he uttered. “I wish we could take a couple of the wolf hounds
with us. We shall be almost certain to catch a wolf in the valley, and I
should like to have you see how easily the dogs could overtake and
pull him down. But by the time we get the tent and all our provisions
and a brace of setters crowded into the boat, it will be pretty well
loaded, I tell you. Now, if Dick Langdon were only here to go with us,
we would have a time of it, wouldn’t we? By-the-way, George, we
must write to him as soon as we come back.”
Poor Bob was destined to “have a time of it,” as it was, and on
more than one occasion he told himself that he and George would
never live to write a letter to Dick Langdon.
As the boys intended to make an early start, they made all the
preparations they could that night, so that they would not be delayed
in the morning.
Bob gave his orders to the cook, who promised that they should
not suffer for the want of something to eat while they were in camp;
and after supper the skiff was hauled from its moorings at the boat-
house, and made fast to a tree on the bank, in front of the ranch.
The little tent, which had sheltered Bob and his companions
during the journey from Dixon Springs, was put into it, together with
a goodly supply of canned goods—enough to last them a month,
George said—and then the two setters that Bob intended to take with
him were separated from the rest of the pack and shut up in the
kennel, so that they could be found when wanted.
After that the two boys went to bed and slept the sleep of the
innocent and healthy, while Arthur, tormented by his fears, rolled
uneasily about on his couch, utterly unable to close his eyes in
slumber.
Bob was up at the first peep of day, and in a very few minutes he
and George were ready for the start. As soon as they were dressed,
they made their way to the kitchen, and there they found the cook
and a cup of hot coffee waiting for them. One of the tables was
loaded with the bread, pies and cookies that had been baked for them
the evening before.
“There isn’t room enough in the skiff for all that provender,” said
George, who was fairly astonished.
“It’s got to go in,” replied Bob. “My schoolboy appetite clings to me
yet, and I never go into camp without plenty to eat. If the fish don’t
bite, we’ve got a side of bacon and a whole ham to fall back on.”
Having eaten breakfast and packed the bread, pies and cookies
away in baskets which the cook brought out of the storeroom, they
bade the latter good-by and left the ranch.
“Look out for the current, boys,” said the man, as he stood in the
door watching them. “There must have been a heavy fall of rain
somewhere in the mountains yesterday, for the river is just a-
booming this morning.”
“All right, Ike,” replied Bob, cheerfully, “I know too much about
this stream to take any risks.”
Notwithstanding George’s prediction, there proved to be room
enough in the skiff for all the baskets, as well as for the two setters
and everything else they had to take with them.
After the guns and fishing-rods had been put in, and Bob had
satisfied himself that nothing had been forgotten, he cast off the
painter, hauled the boat broadside to the bank, and motioned to
George to jump in. The latter looked dubiously at the water and
hesitated.
“Hadn’t we better pull the skiff up the river a little before we get
in?” said he. “This current runs like lightning, and I am afraid we
can’t stem it.”
“Don’t be uneasy,” assured Bob. “There’s not the least danger. I
have many a time pulled this boat from this landing alone against a
worse current than this. We are perfectly safe as long as we don’t
allow ourselves to be carried below that big cottonwood you see over
there. If we do that, we are doomed.”
George’s fears were by no means set at rest; but, nevertheless, he
got into the boat. When he had shipped his oar, Bob threw in the
painter and jumped in after him, pushing the skiff away from the
bank as he did so. A second later the current caught the bow of the
little craft, which, in spite of all George could do to prevent it, swung
around as if she had been hung on a pivot, and started with railroad
speed toward the black mouth of the canyon, which seemed to yawn
close in front of them.
“Steady! There is no danger,” said Bob, encouragingly, as his
companion suddenly faced about on his seat, revealing a face that
was as pale as death itself. “You back water strong, while I give way.”
The struggle was destined to end most disastrously.
CHAPTER XXIV.
THE TERRORS OF THE CANYON.

“D on’t stop to look behind you, but back water the best you
know how,” said Bob, seeing that his companion now and
then ceased his exertions, and faced about on his seat to gaze at the
canyon. “A few strong, steady strokes will put us all right.”
George dropped his oar into the water again, and pushed it from
him with all his strength, while Bob exerted himself to the utmost to
turn the boat around with the bow up stream.
For a long time the contest seemed doubtful, but gradually the
skiff began to turn, and George was beginning to take heart again,
when suddenly he heard an ominous snap behind him, followed by a
cry of alarm from Bob.
The cold chills crept all over him. With an indescribable feeling of
terror, he turned quickly about, and saw his companion holding the
stump of his oar in his hands, while his eyes were riveted on the
blade, which was floating off with the current.
The two boys looked at each other in silence, and then they looked
toward the mouth of the canyon.
“We are the victims of treachery, George,” said Bob, as soon as he
could speak. “Somebody removed this leather, sawed the oar half in
two, and then put the leather back again, just as it was before. Give
me your oar. If I can keep her broadside to the stream, perhaps the
current will throw us against the bank.”
He did not speak nor act like a boy who stood in momentary fear
of a violent death. His face was very pale, but his voice and his hands
were steady, and his words were uttered with the greatest calmness
and deliberation. He was as cool, apparently, as he was while
scudding before the gale in Dick Langdon’s water-logged canoe.
George, on the contrary, was almost paralyzed with terror. His
hands trembled violently, and while he was trying to unship his oar,
in order to pass it back to his companion, it slipped from his grasp
and fell into the water, and although they both made such frantic
efforts to recover it that they came within a hair’s breadth of
capsizing the heavily-loaded skiff, it floated quickly out of their
reach, carrying with it the last particle of their courage and all their
hopes of escape.
Being left at the mercy of the current, the skiff gradually veered
around, until her bow pointed down stream, and once more started
with terrific speed toward the yawning mouth of the canyon.
“It’s all up with us, George,” said Bob, still speaking with
wonderful calmness. “No power on earth can save us now from going
into that canyon. What are you going to do?” he added, as George
suddenly arose to his feet and began pulling off his coat.
“I am not going under without making the best fight I can,” replied
George, in desperation. “I am going to see if I can tow the boat to the
bank.”
“Sit down!” said Bob, earnestly, at the same time seizing his friend,
and pulling him back into his seat. “Are you tired of life? You
couldn’t stem this current for an instant. It will be time enough for us
to take to the water when the boat is smashed on the rocks in the
canyon.”
The boys were so completely stunned by their fearful peril, that
they had been blind and deaf to everything else; but now they turned
their eyes toward the shore, and saw that there was a terrible
commotion there.
When Ike saw the oar break in Bob’s hands, he had raised his voice
in frantic appeals for help, and soon succeeded in arousing all the
inmates of the ranch.
There were a dozen or more of them, all stalwart, courageous men,
who would have risked their lives any day to save Bob Howard.
But what could they do but stand helplessly there on the bank and
see the boat and its terrified occupants disappear in the canyon?
Some seemed to be urging one thing, and some another—all except
Uncle Bob and Arthur.
The former, who was of about as much use in an emergency as a
wooden man would have been, walked aimlessly up and down the
porch, calling loudly upon the herdsmen to do something and be
quick about it, while Arthur stood off by himself and gazed at the
flying boat as if he were fascinated.
The only ones who did not seem to lose their heads altogether were
the superintendent and Mr. Evans. As they ran swiftly along the bank
to keep pace with the boat, Bob saw that they were knotting together
a couple of long lariats.
“That’s our only chance, and it is a very slim one,” said he. “If we
can catch that rope when it is thrown to us, and they try to pull us up
against this current, they will draw the boat under.”
A moment later, a clear strong voice was heard above the excited
gabble of the terror-stricken herdsmen.
“Silence!” it cried. “I want to make those boys hear me. Bob, stand
by to catch this lasso, and we will haul you ashore. Are you all
ready?”
“Let it come!” shouted Bob in reply.
In an instant the herdsmen became silent and expectant. Mr.
Jacobs swung the coiled lariat around his head a few times and then
launched it out over the water. Anxious eyes watched it as it flew
through the air—not in a direct line for the boat, but several feet in
advance of it.
“It’s going wild!” cried George, in dismay.
“Don’t be alarmed,” was Bob’s encouraging response. “The current
will take us under it.”
And so it proved. The lariat fell squarely across the middle of the
boat, and the two boys threw themselves upon it and held fast to it.
A wild cheer burst from the men on shore, and was echoed by
George Edwards, who now looked upon their rescue as a thing
beyond a doubt. But Bob did not cheer, for he knew that the worst
was yet to come.
The lariat was slipping through his fingers in spite of all he could
do to prevent it; so he took a turn with it around the nearest thwart,
and looked up to see what Mr. Jacobs was doing.
He and Mr. Evans who held only about four feet of the other end of
the lariat in their hands, were running at the top of their speed
toward the grove, evidently with the intention of using one of the
trees as a snubbing-post.
“On shore, there,” shouted Bob, whose excitement was greater
than it had been at any time since his oar broke in his hands. “Make
another lariat fast to your end, so that you can give us plenty of slack
when the strain comes. If we don’t have a good deal of slack the
current will certainly carry us under, unless something breaks.
“All right!” shouted Mr. Jacobs. “Hold fast to your end, and we will
bring you ashore safe and sound.”
He turned and said something to one of the herdsmen, who darted
off toward the ranch. When Bob saw that he gave up all hope.
“It’s no use, old fellow,” said he despairingly. “If that man must go
to the house for another lariat before they can give us any more rope,
we might as well make up our minds that we’ve got to go into that
canyon. As this is the last chance, I shall have to bid you good-by. I’ll
say—”
Just then came the strain which Bob so much dreaded. The line
was suddenly whipped up out of the water and drawn as tight as a
bow-string, the spray flying from it in a perfect shower.
The stern of the skiff was jerked violently around toward the bank;
but, instead of swinging in, as everybody hoped and believed she
would, she careened until the water came in over the gunwale, and
she seemed to be on the very point of capsizing.
The boys threw themselves as far as they could over the opposite
gunwale to right her; but just then there was a loud crash, the line
was torn from their grasp, and Bob and his companion recovered
themselves just in time to see the thwart, to which the lariat had been
made fast, fly out of the boat and land in the water twenty feet
astern.
The men on shore stood aghast, and the boys clutched the
gunwales of the boat, which, after rocking from side to side for a
moment or two with the greatest violence, finally came to an even
keel, and shot toward the canyon with accelerated speed.
It was too late now to do anything more. Escape was impossible,
and even George had given up all hope of it, and nerved himself to
meet his fate. He and Bob had just time to take one short farewell
glance at their agonized friends on shore, and then the boat was
swept into the canyon, and darkness, impenetrable darkness, closed
about them!
No pen can describe the anguish of mind experienced by these two
boys as they sat there on the bottom of their boat, clinging to the
gunwales with a death-grip, holding their breath in suspense, and
waiting for their frail craft to be smashed into kindling wood against
some unseen obstruction.

The wind whistled past their ears, and deeper and blacker grew the
darkness of the canyon as their boat sped on its way.
There was no sound heard save the rush of the water against the
bank on either hand, but the speed with which they were moving was
simply appalling.
Believing that a recumbent position was safer than an upright one
—as the darkness was so intense that it seemed as though the walls
and roof of the canyon must be within easy reach of his head—Bob
threw himself backward, and, with his head resting on the tent and
his eyes directed toward the top of the canyon, awaited the issue of
events with a calmness that surprised himself.
Now and then a little patch of light, far above him, would shoot by
with such surprising swiftness that his hair would fairly stand on
end, and he would clutch the sides of the boat with a firmer grip, and
wonder how much longer this wild ride must continue, and how long
it would be before the catastrophe would come.
The slightest obstruction in their course—a bush leaning over the
water and striking the bow of their boat, and turning it from its
course by so much as a hair’s breadth—would have ended all this
suspense and anxiety in an instant of time.
But there was no bush nor anything else in their way. The channel
was as smooth and deep here as it was in the valley they had left—
how long ago? Was it an hour or a day? Bob did not know, for he
could take no note of the flight of time.
The interior of the earth must be a long way off, he thought; and
that he was drawing nearer to it every minute seemed probable, for
these little patches of light he had noticed a while back were no
longer to be seen. Above, around and beneath him was darkness.
He could not even see the water by which he and his companion
were borne along. He wasn’t certain that he had a companion in his
misery, for he had not heard anything from George since they
entered the canyon.
He was about to pronounce his name, when a blinding glare of
light shot down upon him so suddenly that it frightened him. Was he
awake or dreaming? He raised himself to a sitting posture and
looked about him.
Behind him was a black opening between the mountains, looking
exactly like the one on the other side of the range, and in front and
on each side of him was a broad and fertile valley, through which the
boat was flying with undiminished speed.
Bob rubbed his eyes and looked again; and at the same moment,
George Edwards, who had also lain down in the boat to avoid hitting
his head against the rocks, which were at least two hundred feet
above him, straightened up, revealing a face so pale and haggard that
Bob was startled. But he was not so near dead as he seemed to be, as
his actions proved.
The river, where it entered the valley, made a sudden turn to the
right, and of course the current set into the bight of the bend, taking
the boat with it, and carrying it within ten or fifteen feet of the shore,
which was thickly lined with bushes.
George’s first act was to catch up the painter and jump overboard
with it; and, although the current whirled him along as if he had been
a feather, he succeeded in crossing it and reaching the slack waters
near the bank.
The rest was comparatively easy. A turn of the painter around a
convenient sapling held the boat until the current swung it into the
eddy, and the instant it touched the shore Bob Howard sprang out.
He and George had just strength enough to make the painter fast
to the sapling, and then they sank down side by side on the grass,
and lay there panting and exhausted.
They were so dazed and bewildered by their escape from the grasp
of the current, which they regarded as little short of miraculous, that
they could not speak.
They did not move until they were brought to their feet by a low,
rumbling noise, followed by an explosion so terrific that it would
have drowned the discharge of a battery of the heaviest artillery.
“What in the name of wonder was that?” gasped Bob, who was so
weak that he shook like a leaf.
George did not answer. He was looking over Bob’s shoulder, with
eyes that seemed ready to start from their sockets.
Bob faced about, and saw a sight that well nigh extinguished the
little spark of vitality which the terrors of the canyon had left in him.
CHAPTER XXV.
SAM ASKS FOR HIS PAY.

“W e did our very best to save him, but he’s gone, and my father
is a millionaire.”
This was the burden of Arthur Howard’s thoughts, as he wandered
restlessly about the grove, with his hands in his pockets, and his eyes
fixed on the ground. The bank of the river was deserted by all save
himself.
The herdsmen were gathered in little groups about the ranch,
conversing in hushed tones, and now and then there was an ominous
growl among them that boded no good to somebody, and threatening
eyes and scowling faces were turned toward the window of the office.
The superintendent and Mr. Evans stood off by themselves,
occasionally exchanging a word or two, but generally remaining
silent and thoughtful. Uncle Bob sat alone in the office, thinking
sometimes of his lost nephew, but more frequently of the bright and
dazzling future which had so suddenly and unexpectedly opened
before him. Like Arthur, he was entirely unnoticed, the men about
him having no sympathy for him. Their thoughts were with Bob and
his companion.
“The old fellow seems to take it very much to heart,” said Mr.
Jacobs. “But it’s my opinion it is all put on for the occasion.”
“That seems to be the opinion of the herdsmen, too, if one may
judge by their looks and actions,” answered Mr. Evans. “If they had
the least excuse for it, they would put the dogs on him and his son
and drive them out of the valley.”
“I know their temper better than you do, and I am not far from
right when I say that they would serve them worse than that,” said
the superintendent. “If the men thought that Arthur and his father
were in any way mixed up with this morning’s work, a regiment of
soldiers could not save them.”
“I would give the world, if I owned it, to know whether or not they
suspect anything,” thought Arthur, who now and then stopped
behind a tree or a clump of bushes to take an anxious survey of the
groups about the ranch. “Why don’t they go off about their work, and
let me go to my room? They needn’t blame me for anything that
happened, for I didn’t suggest it, and I had no hand in carrying it out.
Sam did it out of a desire to be revenged on Bob for telling Mr.
Jacobs that he could not have employment on the ranch. But, great
Scott! what a sight that was!” said Arthur, covering his eyes with his
hands. “I don’t think I shall ever forget it.”
And he never did. The pale, despairing face which the helpless Bob
had turned toward the shore, just before his boat took its final
plunge, haunted him day and night as long as he lived.
Just then Arthur was startled by a rustling in the thicket close by
his side (he was so timid now, that every little thing frightened him),
and turned quickly, to find Sam at his side.
The latter was as serene and smiling as usual, and did not look at
all like a man who had been guilty of a crime for which his life might
at any time pay the forfeit.
Arthur was glad to see him on some accounts, and on others he
wasn’t. As he could not bear to be alone with his accusing conscience,
he wanted somebody to talk to, but he would rather it had been
somebody besides Sam.
It would have been a great relief to him if the herdsman had
saddled his horse and left the valley, never to return; but something
told him that Sam did not intend to do anything of the kind. He was
more familiar in his manner than he was the day before, and not
quite so civil.
“Well, what do you think of it?” said he, at the same time backing
up against a tree, so that he could not be seen by the men about the
ranch. “You’ve got your cousin’s fortune, and I have had my
revenge.”
“I wish you hadn’t done it,” was all Arthur could say, in reply.
“That’s a pretty way for you to talk, now, when it is too late—isn’t
it?” said Sam, in disgust. “Yesterday, you were eager for it. I saw it
very plainly, and that was the reason I proposed it.”
“But I didn’t suppose you would do it.”
“That was because you didn’t know me. I never fool about such
things. You were in dead earnest, and I knew it, and acted
accordingly.”
“Do you suppose that the men suspect anything?”
“If they did, they would make short work of us,” assured the
herdsman with a grim smile. “We wouldn’t be here to see another
sunrise, I bet you.”
Arthur winced at this, and he was greatly alarmed, too.
Sam’s use of the personal pronoun seemed to indicate that he was
not willing to shoulder all the responsibility himself. According to his
way of thinking, Arthur was as deep in the mud as he was, and Sam
did not mean to let him forget it, either.
“Everything is in our favor,” continued the herdsman. “I have
heard Bob’s father tell him more than once that he didn’t look for
anything but to see him lost in the canyon some day, and there are
others who have heard him say the same thing. So, why should they
suspect that we had anything to do with it?”
“I don’t know, I am sure. I asked the question because the men up
there,”—here Arthur nodded his head toward the ranch—“seem to be
angry about something.”
“Probably they are; for, as I told you yesterday, they don’t like you
or your father. They know that you will come into possession of this
property now, and they don’t want to have it so.”
“I don’t see how they are going to help it.”
“I don’t either; but they can make this a hot country for you, if they
set about it. Now, then, to business! I have come for my pay.”
“For your pay!” echoed Arthur.
“That’s what I said. You don’t suppose that I am going to put you
into possession of a property worth millions of dollars, and take the
risk of a lynching for nothing, do you? What kind of a hair-pin do you
think I am, anyway?”
Arthur was almost overwhelmed with amazement and terror. He
had never dreamed of this.
“I don’t owe you anything,” he managed to say at last. “I told you
that I would use my influence with my father to have you employed
on the ranch; and so I will, just as soon as Mr. Evans goes away and I
can find an opportunity to speak with him in private; but, beyond
that, I can do nothing for you.”
“It ain’t enough, pilgrim!” replied Sam, in quiet, but decided tones.
“Must have more.”
“But I say I don’t owe you anything.”
“I reckon I could make you change your mind in just two minutes,
if I should set about it,” said Sam, looking at Arthur in a way that
made him shiver all over.
“How much do you want?”
“Well, five thousand dollars will do to start on!”
“Five thousand dollars!” gasped Arthur, who thought he would
surely have fallen to the ground, if he had not placed his hand
against the nearest tree to steady himself. “Why, I haven’t got five
thousand cents to my name.”
“No, I suppose not,” replied Sam, indifferently. “Clerks, who sport
such dry goods as you had on your back when you first came here,
don’t generally have any loose change laying around. But your
father’s got it. He must have twenty or thirty thousand dollars in that
safe of his.”
“But he wouldn’t give any of it to me,” said Arthur, who was every
moment growing more astonished and alarmed.
“Oh, I guess he would, if he knew all the circumstances,” answered
the herdsman, significantly.
“But I don’t want him to know all the circumstances,” protested
Arthur, quickly. “And what excuse can I make to him for demanding
so large a sum of money?”
“That is a matter in which I am not at all interested. I don’t care
how you get it, so long as you get it; and I fancy you will make up
your mind to do it after you’ve had time to think the matter over.”
“No, I won’t,” said Arthur, his fears giving away to anger. “You had
no right to ask it of me, and I shall make no effort to get it. I
shouldn’t succeed if I did. You proposed this thing yourself, and did
the work alone and unaided, and I—”
“Well, why don’t you go on?” inquired Sam, when the other paused
and looked at him. “See here, my friend,” he added, shaking his
finger at Arthur, while his eyes flashed threateningly, “you have had
your say, and now I am going to have mine. I want that money, and I
am going to have it, too. You hear me? If you won’t get it for me, I
will go straight to your father, and tell him the whole story. I think he
would rather give me the money than lose all Bob’s millions—don’t
you?”
“Oh, don’t do that!” implored Arthur, whose anger was all gone
now. “I’ll ask him for it the first chance I get.”
“But if he wouldn’t—if he doesn’t fork out on demand, I will see
that the boys get wind of the whole affair, and what do you suppose
would be the result? They are just in the right humor for business
now, and if I should leave a little note where one of them could find
it, you and your father would be—”
Here Sam stopped, and looked up at the branches over his head. It
needed no words to explain what he meant.
“Don’t! don’t!” cried Arthur, who was trembling in every limb. “I
will ask for the money before I go to sleep to-night—honor bright, I
will.”
“I knew you would change your mind after you had thought the
matter over,” said Sam, with a meaning smile. “Now, how soon may I
expect to get the five thousand?”
“Just as soon as I can induce my father to give it to me,” promised
Arthur.
“Well, say to-morrow, then. I will meet you here in the grove right
away after breakfast. I don’t want a job at herding sheep, now, and I
don’t want to hang around any longer than I can help; so don’t waste
any time.”
“Are you going away?” asked Arthur, eagerly.
“You bet! I don’t think my constitution can stand this climate.”
“And will you promise that you’ll never come back and make any
more demands upon me?”
“Not much! I’ve struck a bonanza, and I’m going to work it as long
as the lead holds out. I know what you are thinking of, young man;
but you’ll find that I’m nobody’s fool. Now, remember, I shall be on
hand to-morrow morning, and I want to find you here with that
money.”
Sam disappeared, and Arthur resumed his wanderings about the
grove. He was frightened almost out of his senses, and wished from
the bottom of his heart that he had never seen or heard of his
companion in guilt. He even went further than that, and wished that
his uncle had given his property into the keeping of somebody else,
and that he and his father were back in Bolton, where they came
from. What in the world could he say that would induce his cousin’s
guardian to give him the five thousand dollars that Sam demanded
as hush-money? He knew very well that he couldn’t get it; and even if
he did, what good would it do him?
There was evil coming upon him; he was sure of it. And this money
would only postpone it for a little while. It would not avert it, for Sam
had said very plainly that he was not going to be satisfied with the
amount he had named—that he intended to make demands as often
as he felt like it.
Arthur grew almost wild when he recalled the man’s words. He
wrung his hands, and even quickened his steps to a run, as if he
hoped to leave his haunting fears behind him.
“There is only one thing I can do,” said he to himself, after he had
bestowed as much thought upon the situation as the perturbed state
of his mind would permit. “I must get away from here. Father must
give me money enough to take me back to Bolton. I say must do it, or
I shall help myself to what I need. There goes Mr. Evans, and father
is probably alone in the office. If he is, I will settle this matter with
him before I am an hour older.”
So saying, Arthur wiped the big drops of perspiration from his
face, put on as bold a front as he could, and started toward the ranch.
A few of the herdsmen had dispersed to their work, but those who
remained scowled at him so savagely as he passed that Arthur made
all haste to get into the hall out of their sight.
CHAPTER XXVI.
ARTHUR TRIES TO HELP HIMSELF.

A rthur found his father alone in the office, pacing the floor, with
his hands in his pockets, and a look of triumph and exultation on
his face; but, when his son entered, he sank into the nearest chair,
and tried to appear very sorrowful, indeed.
“That was a sad event, Arthur,” said he, with a long-drawn sigh—“a
very sad event. I don’t wonder that you look frightened. I was
frightened myself, and so was everybody else; but we have the
satisfaction of knowing that we used our utmost endeavors to save
him.”
We have already told how hard Uncle Bob and Arthur worked to
keep the boat from going into the canyon. The former did nothing
but shout out orders, to which nobody paid the least attention, while
Arthur stood by and looked on, without uttering a word.
“Yes, I know we did all we could,” replied Arthur, faintly; “but we
couldn’t help him. Bob knew as well as we did that he was doomed.
He told me yesterday, while we were down the river looking at the
canyon, that if I went out in a boat, I must be careful not to let that
current get hold of me. If I did, I might as well be in the rapids above
Niagara Falls, for nothing could save me. Now, father, I can’t stay
here any longer, and I want you to give me money enough to take me
back to Bolton.”
“I should like to go there myself, or somewhere else, and stay until
time has somewhat effaced the memory of this terrible occurrence;
but, under the circumstances, I don’t think it best for either one of us
to leave,” answered Uncle Bob.
“Why not?” asked Arthur. “Why can’t we both go?”
“Because our absence might give people occasion to say hard
things about us.”
“I don’t see why it should. We had nothing whatever to do with it.”
“Certainly not. But that wouldn’t make any difference to these
herdsmen, who are as unreasonable as so many pigs. I can see very
plainly that they don’t like us, and don’t want us here; but, to tell you
the plain truth, Arthur, I should be afraid to go away after what has
happened.”
“Why would you?”
“Because these ignorant men would take it as a confession of guilt
on my part.”
All unaccustomed as Arthur was to reasoning a posteriori—that is,
from the effect to the cause—he told himself that his father never
could have reached this conclusion if he had not felt guilty.
Although Uncle Bob tried to believe that he was sorry his nephew
was gone, he did not succeed in deceiving either himself or those
about him; and it was not at all improbable that an attempt at flight
on his part would have resulted in something serious.
Whenever Uncle Bob allowed his mind to dwell upon this matter,
he became as badly frightened as Arthur was. Dearly as he loved
money, he loved life better, and he would willingly have surrendered
his nephew’s millions if, by so doing he could have transported
himself and Arthur back to Bolton, where he knew they would be
safe.
“And must we stay here in the midst of these lawless men, who
may at any moment take a notion to hang us?” exclaimed Arthur in
great alarm.
“It seems to be our only chance,” confessed Uncle Bob, in agitated
tones. “I have thought the matter all over, and I don’t see that we can
do anything else. If we could only make these men believe that we
take the matter as much to heart as they do, they wouldn’t think so
hard of us; but they are very obstinate and set in their ways, and it
will take time to accomplish that.”
“But, father, I can’t stay here,” insisted Arthur, jumping to his feet,
and walking nervously up and down the floor. “I shall go crazy if I do
—I know I shall. If you won’t go with me, give me money and let me
go alone. You’ve got plenty of it. I heard one of the men say that there
were twenty or thirty thousand dollars in that safe.”
“There’s more than that in there,” said Uncle Bob. “But it isn’t the
money I care for. I was thinking of you. It would not be best for you
to leave now.”
“I will take all the risk,” pleaded Arthur. “Don’t refuse, for if you
do, there is no telling what may happen.”
“Don’t get excited over it,” advised Uncle Bob, who was anything
but calm himself. “Be governed by me, and hope for the best.”
Arthur who became almost frantic whenever he thought of Sam,
and the interview he had appointed for the morrow, “right away after
breakfast,” said everything he could think of to induce his father to
grant his request, but he urged and begged in vain.
When Uncle Bob once made up his mind to a thing, he was fully as
obstinate and unreasonable as the herdsmen to whom he had
referred in tones so contemptuous, and Arthur might as well have
argued with the stone walls of the ranch.
Finding that he could make no impression upon his father, the boy
grew angry, and was more than once on the point of declaring that
Sam had made a demand upon him for five thousand dollars,
threatening, in case of refusal, to publish a story of his own getting
up, that would induce the herdsmen to make short work of both of
them.
But his guilty fears would not allow him to do it, and, besides, he
had some other plans in his head that he wanted to try first, so he
bolted out of the office, banging the door behind him.
“He’s the meanest old hulks of a father that any fellow ever had,”
thought Arthur, stopping in the hall long enough to shake his fist at
the door, “and I don’t care what happens to him. As he is too pig-
headed to do as I want him to do, I’ll help myself to every cent there
is in that safe this very night if I can get in. If I succeed, I will give
Sam his hush-money to-morrow morning, and hire him to show me
the way to the railroad station. I have seen quite enough of Arizona,
and if I can only get aboard a train of cars that is headed for the East,
the prospect of owning four times four million dollars won’t bring me
back here.”
While Arthur was talking to himself in this way, he looked
cautiously out of the door, and, having satisfied himself, by a few
minutes’ reconnaissance, that the herdsmen had all dispersed, he
walked across the porch, and bent his steps toward the grove.
He wanted to be alone, and this was the most retired spot he could
find. It was utterly impossible for him to keep still, and here he could
walk about among the trees without being seen by anybody.
Arthur had been in the grove, perhaps half an hour, keeping his
thoughts busy with the plans he intended to put into operation in
case his attempt to steal the money in the safe did not prove
successful, when he saw the superintendent stop in front of the porch
with a couple of horses that were saddled and bridled.
After he had stood there for a minute or two, Uncle Bob came out
of the ranch, with his hat on his head and a riding-whip in his hand.
He mounted one of the horses, Mr. Jacobs sprang upon the other,
and together they rode away.
“They are going off somewhere on business,” soliloquized Arthur,
“and this is as good an opportunity as I shall have to take a look at
that safe. I wish the money in it belonged to me, and that the old
man wanted some of it. He shouldn’t have a cent if he was starving.”
Arthur gave the horsemen time to get out of sight, and then he left
the grove and walked toward the ranch.
He went into the office, and having locked the door to prevent
interruption, he began an examination of the safe, which was set into
the wall so that nothing but the face of it could be seen.
If it had been provided with a combination lock, Arthur would
have set to work upon it at once; but as it was an old-fashioned
article, requiring a key to open it, he could do nothing.
Thinking it possible that his father might have left the key in the
room, he began looking for it in the bookcases, under the lounge,
along the edge of the carpet—in every place, in fact, that seemed to
offer the least chance for concealment, but his search was in vain.
“It is in his pocket, most likely,” said Arthur, as he unlocked the
door, sat down in one of the easy chairs, and opened a book, which
he had taken at random down from one of the shelves. “I’ll just hang
around the rest of the day, and satisfy myself on that point. That key
is the only thing that stands in my way. If I can get my hands on that,
the rest will be easy enough, for I know how to open the safe.”
Arthur turned his chair about so that he could not see the river
when he happened to glance out of the window—somehow, he could
not bear the sight of it now—and tried to amuse himself by looking at
the engravings in the book he held in his hand; but the excitement
and suspense which had taken the place of his fears were too much
for him, and sometimes he would spring to his feet and rush about
the room like some caged wild animal.
But he was quiet enough when his father returned about dinner-
time, and came into the office, accompanied by the superintendent.
Some argument had arisen between them regarding the business
of the ranch, and, in order to settle it, they had to refer to the books
that were in the safe.
Arthur saw his father take the key from his pocket and insert it in
the lock, and took particular notice to the way he twirled the knob.
When the door swung open and the interior of the safe was
disclosed to his view, Arthur was not a little astonished.
One of the shelves was piled full of greenbacks, and on the shelf
under it were four large tin boxes, which were filled to the brim with
bright, shining gold pieces.
As he did not care to stay there and listen to a discussion about
matters of which he knew nothing and cared less, Arthur put away
his book and went out into the hall.
He walked about for a few minutes, with his eyes fastened
thoughtfully on the floor, and then hurried to his room and began to
unpack his valise. He had not thought of it before.
“There’s a lot of money in that safe,” said he to himself, “and I
must have something to carry it in, for I couldn’t get the tenth part of
it into my pockets. I don’t know what the old man will say when he
finds that his safe has been emptied; and, in order to keep it from his
knowledge as long as I can, I will take the key with me when I go. I
wish now that I had told Sam to meet me about midnight. If he
comes to the grove this afternoon, I will make new arrangements
with him.”
Arthur spent the entire afternoon in the grove, with his thoughts
for company; but Sam did not put in an appearance. He knew better.
He had made some threats against Bob in the presence of some of
the herdsmen, and the valley was not a safe place for him. He was
idling away the time in the seclusion of a deep ravine a short distance
away, waiting impatiently for the morrow.
Arthur went to bed as soon as he had eaten his supper, and when
his father came into the room, about eleven o’clock, he lay with his
face to the wall, apparently fast asleep. The two had but little to say
to each other since the interview in the morning.
Uncle Bob tried to be sociable while they were at the table, but
Arthur would scarcely listen to him.
“I was the only friend he had on the ranch,” the youth kept saying
to himself, “and I want him to see that he has made an enemy of me.
If he doesn’t know it now he will find it out very shortly.”
It was long after midnight before Arthur made any move to show
that he was awake. Then he turned over very cautiously, and, after
listening intently for a few minutes, he made up his mind that the
time for action had arrived.
Noiselessly he arose from the bed and moved towards the chair
upon which his father had deposited his clothing.
After a little fumbling in the dark, he found the pocket of which he
was in search, and his fingers closed tightly on the coveted key.
Hardly able to repress an exclamation of triumph, Arthur picked
up his valise, which he had placed at the foot of his bed, unlocked the
door and passed through the hall into the office.
Feeling his way to the safe, he put the key into the lock, turned the
knob, and the door opened for him.
“It’s all mine,” thought he, as he opened his valise and proceeded
to stow the greenbacks away in it. “If father wants to stay here, and
run the risk of being hanged, he can do it and welcome; but I’m off
for Bolton, this very—”
All on a sudden, the door of the office creaked on its hinges, and
the room was brilliantly illuminated. With a piercing cry of terror,
Arthur looked over his shoulder and saw his father standing behind
him, holding a lamp in one hand and a big revolver in the other.
CHAPTER XXVII.
THE LISTENER IN THE GROVE.

I t is hard to tell which was the more astonished by this unexpected


encounter—the father, who having been aroused from uneasy
slumber by the stealthy closing of his bedroom door, and growing
alarmed for the safety of the large amount of money in his
possession, had aroused himself and come into the office to make
sure that everything was right there, or the son, who had so suddenly
been interrupted in the very act of robbing the safe.
The two looked at each other for a moment in silence, and then
Arthur put back the package of greenbacks he had been on the point
of stowing away in his valise, while Uncle Bob placed the lamp on the
table and sat down.
“Arthur, what in the world does this mean?” said he, sternly.
“It means that if you hadn’t come in here just as you did, I should
have been miles on my way toward Dixon Springs by this time to-
morrow,” replied the son, rising to his feet and boldly confronting his
father.
“And did you intend to rob me?”
“I certainly intended to take some of this money to help me along,”
answered Arthur, without the least tremor in his tones. “I asked you
for it this morning, openly and above board, and you wouldn’t let me
have it, saying, as an excuse for your refusal, that you were ‘afraid
that the herdsmen would do something to me if I attempted to leave
the valley so soon after Bob’s disappearance.’”
“And I tell you so now,” said his father.
“Didn’t I assure you that I was willing to take all the risk?”
demanded Arthur.
“And didn’t I tell you, in effect, that if you would only be governed
by me and consent to stay here until this thing had time to blow over,
it would then be perfectly safe for both of us to go East?” asked his
father, in reply. “I am as anxious to see the last of Arizona as you are.
I had a long talk with Mr. Jacobs about it yesterday, and decided to
employ him to manage the ranch for me, while you and I would go
back to Bolton to live. I should have told you about it as soon as I
came home, if you had shown any disposition to talk to me.”
“Why don’t you go at once?” growled Arthur.
“I have already given you my reason. I think I ought to stay here
for a few months, at least; and Mr. Jacobs thinks so, too.”
“Well, then, won’t you give me some money and let me go?”
“I answered that question yesterday,” said Uncle Bob, in very
decided tones. “Have you got any money in that valise? Then put it
back where it belongs, and we will go back to bed.”
Knowing that his hopeful son could not be trusted, Uncle Bob took
the precaution to see that these instructions were obeyed to the very
letter.
He took his stand beside the open valise, and closely watched
Arthur, as he took the packages out of it and piled them on the shelf.
Then he closed and locked the safe and took possession of the key,
telling himself the while that Arthur would never be able to get his
hands upon it again.
The two did not speak as Uncle Bob took up the lamp and revolver
and led the way to their room.
He did not appear to be angry, either; but Arthur was almost
beside himself with fury. He was more—he was desperate. There was
still one plan to be tried, and, if that failed, it was all over with him
and Uncle Bob.
“Perhaps, when it is too late, he will wish he had let me have that
money,” thought Arthur, as he tumbled into bed and turned his face
to the wall. “His excuse for refusing me is a very flimsy one. He’s got
Bob’s money, and I believe he would rather risk his life than lose his
grip on a single dollar of it.”
Arthur slept in spite of the exciting scene through which he had
passed, but his slumber was disturbed with frightful dreams, in
which the angry herdsmen and Bob Howard’s broken oar, which, in
some mysterious way, was brought forward as evidence against him,
bore prominent parts.
His father greeted him in the morning as cordially as he always
did, but Arthur was too angry and sulky to be civil. He ate but little
breakfast, and as soon as he arose from the table he went to the grove
to keep his appointment with Sam.
He would have been glad to postpone the interview indefinitely,
but he was afraid to do it. He believed that Sam would have
something to say to his father, now, and, before he did that, Arthur
wanted to make a few suggestions.
He found the herdsman in the grove, waiting for him. It is
probable that he fully expected to receive the money he had
demanded for holding his tongue; for, when he saw Arthur
approaching, he advanced to meet him, at the same time extending
his hand, as if he thought the latter was going to put something into
it.
“I haven’t got it,” said Arthur, shortly.
Sam scowled fiercely, and looked mad enough to do almost
anything.
“I can’t help it,” continued Arthur, “I did the best I could for you. I
asked my father for it yesterday, as I told you I would, but he
wouldn’t give it to me; and last night I tried to take it out of the safe,
but he caught me at it.”
“Whew!” whistled Sam.
“It’s a fact,” said Arthur earnestly. “I’ve tried every plan I can think
of, and can do nothing more.”
“What did you say you wanted to do with the money?”
“I told him that I wanted to go back East, but father said he was
afraid that if I attempted to leave the ranch now, I would get myself
into trouble with the herdsmen.”
“Very likely you would,” replied Sam, indifferently. “I talked with
some of them yesterday, and, although they don’t know that you had
any hand in sawing the oars—”
“And I didn’t, either,” interrupted Arthur. “You sawed them
yourself, and I never knew a thing about it.”
“Look here, young man,” exclaimed Sam, in a tone of voice that
frightened Arthur, “you needn’t try to throw all the responsibility
upon my shoulders, for I won’t stand it! You are just as much to
blame for what happened to Bob Howard and his partner as I am!”
“Didn’t you propose it?” faltered Arthur.
“Didn’t you consent to it?” retorted Sam, looking at Arthur so
savagely that the latter dared not deny the accusation. “You did! and
if the boys ever find it out, they will make things hot for you, I tell
you.”
“But of course you will not tell them,” implored Arthur.
“If I can get my five thousand dollars, no. If I can’t, yes. I suppose I
shall have to talk to the old man now.”
“I don’t see what else you can do,” assented Arthur. “But I say,
Sam, don’t mention my name to him, will you? Just tell him that the
boys suspect that he knows how Bob’s oar was broken, and that will
frighten him so that he will hand the money over to you without
saying a word.”
“That’s worth thinking of,” admitted Sam.
“If you want money to keep still about this thing, that is the only
way to get it,” declared Arthur. “I can’t raise it for you, and that’s all
there is about it. I have tried and failed.”
“Well, I shan’t fail,” said Sam, emphatically. “If I do, the old man
may make up his mind that something disagreeable is going to
happen. I’ll sleep on what you have told me, and perhaps I shall be
down again to-morrow morning. Good-by!”
“But, Sam, promise that you will not even hint that I know how
Bob’s oar was broken,” begged Arthur.
“All right!” answered the herdsman.
But he did not give the promise. The time might come, he told
himself, when the youth would be of use to him, and he thought it
best to retain a hold upon him.
“I’ve done it,” soliloquized Arthur, as he once more began his
aimless wanderings about the grove, “and now we shall see what will
come of it. It was the only course that was left open to me, for I could
see very plainly that Sam is fully determined to make trouble, unless
his demands are complied with. I hope he will frighten father so
badly that he will pack up and leave for Bolton at once.”
Arthur was so deeply engrossed with his meditations that he did
not hear the slight rustling in the thicket behind him, which was
made by a man—an unintentional listener to the conversation that
had taken place between himself and Sam—as he arose from a log on
which he had been sitting, and shook both his fists in the air. It was
old Ike, the cook.
He was the first man who had found employment on the ranch,
and, like the rest of the hired help, he thought everything of Bob, and
looked with distrust upon those who had come there to take his dead
father’s place.
Leaving an assistant to attend to his duties in the kitchen, Ike
retreated to the grove shortly after the boat went into the canyon,
and he had been there ever since. He liked to be there. It had been
the lost boy’s favorite resort, and, while he was hidden among the
trees, he could give full vent to his sorrow, for there was no one
looking on to accuse him of a lack of manhood.
Ike peeped cautiously through the bushes to see where Arthur was,
and then he shook his fists at him, and moved away from his place of
concealment with long, noiseless strides.
He walked with that firm, determined step that men sometimes
adopt when they have made up their minds to do something; but,
when he reached the porch, he came to a sudden stop, pulled off his
hat, and scratched his head vigorously.
The operation must have put new ideas into his mind, for he went
on around the house, and made his way to the corral in which the
riding-horses were kept.
Putting a saddle and bridle on the first horse he caught, he forded
the river at the place where the lake emptied into it, and as soon as
he reached the opposite bank, he started on a gallop for Mr. Evans’
ranch.
“So that’s the way my poor Bob come to go into that awful hole, is
it?” said Ike, speaking in a loud voice, as if he were addressing some
one at a distance. “Sam sawed the oars so that they would break
when the boys laid out their strength on them—he did it because he
knew that Bob didn’t want him on the ranch, most likely—and that
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.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookfinal.com

You might also like