C how to program Seventh Edition. Edition Deitel pdf download
C how to program Seventh Edition. Edition Deitel pdf download
Edition Deitel
pdf download
https://ebookname.com/product/c-how-to-program-seventh-edition-
edition-deitel/
https://ebookname.com/product/c-how-to-program-8th-edition-paul-
deitel/
https://ebookname.com/product/java-how-to-program-6th-edition-
harvey-deitel-paul-deitel/
https://ebookname.com/product/java-how-to-program-late-objects-
version-8th-edition-deitel/
https://ebookname.com/product/changing-relations-achieving-
intimacy-in-a-time-of-social-transition-1st-edition-robin-
goodwin/
Occidentalism The West in the Eyes of Its Enemies Ian
Buruma
https://ebookname.com/product/occidentalism-the-west-in-the-eyes-
of-its-enemies-ian-buruma/
https://ebookname.com/product/ap-calculus-bc-2014-2015-edition-
ma/
https://ebookname.com/product/progressions-and-innovations-in-
model-driven-software-engineering-1st-edition-vicente-garcia-
diaz/
https://ebookname.com/product/pricing-portfolio-credit-
derivatives-by-means-of-evolutionary-algorithms-1st-edition-
svenja-hager-auth/
https://ebookname.com/product/crohn-s-disease-etiology-
pathogenesis-and-interventions-etiology-pathogenesis-and-
interventions-1st-edition-jack-n-cadwaller/
The Complete Works of Rosa Luxemburg Volume II Economic
Writings 2 Luxemburg
https://ebookname.com/product/the-complete-works-of-rosa-
luxemburg-volume-ii-economic-writings-2-luxemburg/
Deitel® Series Page
How To Program Series (continued from previous column)
Visual Basic® 2010 How to Program
Android How to Program
Visual Basic® 2008 How to Program
C++ How to Program, 8/E
Visual C#® 2010 How to Program, 4/E
C How to Program, 7/E
Visual C#® 2008 How to Program, 3/E
Java™ How to Program, 9/E
Java™ How to Program, Late Objects Version, 8/E
Internet & World Wide Web How to Program, 5/E
Deitel® Developer Series
Visual C++® 2008 How to Program, 2/E AJAX, Rich Internet Applications and Web
Visual Basic® 2010 How to Program Development for Programmers
Visual C#® 2010 How to Program, 3/E Android for Programmers: An App-Driven
Approach
C++ for Programmers
Simply Series C# 2010 for Programmers
Simply C++: An App-Driven Tutorial Approach iPhone® for Programmers: An App-Driven Approach
Simply Java™ Programming: An App-Driven Java™ for Programmers, 2/e
Tutorial Approach JavaScript for Programmers
Simply C#: An App-Driven Tutorial Approach
Simply Visual Basic® 2010: An App-Driven LiveLessons Video Learning Products
Approach, 4/E
www.deitel.com/books/LiveLessons/
To receive updates on Deitel publications, Resource Centers, training courses, partner offers and more,
please register for the free Deitel ® Buzz Online e-mail newsletter at:
www.deitel.com/newsletter/subscribe.html
and join the Deitel communities on Twitter®
@deitel
Facebook®
facebook.com/DeitelFan
and Google+
gplus.to/deitel
To communicate with the authors, send e-mail to:
deitel@deitel.com
For information on government and corporate Dive-Into® Series on-site seminars offered by Deitel &
Associates, Inc. worldwide, visit:
www.deitel.com/training/
or write to
deitel@deitel.com
For continuing updates on Prentice Hall/Deitel publications visit:
www.deitel.com
www.pearsonhighered.com/deitel/
Visit the Deitel Resource Centers that will help you master programming languages, software develop-
ment, Android and iPhone/iPad app development, and Internet- and web-related topics:
www.deitel.com/ResourceCenters.html
Paul Deitel
Deitel & Associates, Inc.
Harvey Deitel
Deitel & Associates, Inc.
Editorial Director: Marcia J. Horton
Editor-in-Chief: Michael Hirsch
Associate Editor: Carole Snyder
Vice President, Marketing: Patrice Jones
Marketing Manager: Yezan Alayan
Marketing Coordinator: Kathryn Ferranti
Vice President, Production: Vince O’Brien
Managing Editor: Jeff Holcomb
Associate Managing Editor: Robert Engelhardt
Operations Specialist: Lisa McDowell
Art Director: Anthony Gemmellaro
Cover Design: Paul Deitel, Harvey Deitel, Abbey Deitel, Anthony Gemmellaro
Cover Photo Credit: Excellent backgrounds/Shutterstock.com
Media Editor: Daniel Sandin
Credits and acknowledgments borrowed from other sources and reproduced, with permission, in this textbook appear
on page vi.
The authors and publisher of this book have used their best efforts in preparing this book. These efforts include the
development, research, and testing of the theories and programs to determine their effectiveness. The authors and pub-
lisher make no warranty of any kind, expressed or implied, with regard to these programs or to the documentation
contained in this book. The authors and publisher shall not be liable in any event for incidental or consequential dam-
ages in connection with, or arising out of, the furnishing, performance, or use of these programs.
Copyright © 2013, 2010, 2007, 2004, 2001 Pearson Education, Inc., publishing as Prentice Hall. All rights reserved.
Manufactured in the United States of America. This publication is protected by Copyright, and permission should be
obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any
form or by any means, electronic, mechanical, photocopying, recording, or likewise. To obtain permission(s) to use
material from this work, please submit a written request to Pearson Education, Inc., Permissions Department, One
Lake Street, Upper Saddle River, New Jersey 07458, or you may fax your request to 201-236-3290.
Many of the designations by manufacturers and sellers to distinguish their products are claimed as trademarks. Where
those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been
printed in initial caps or all caps.
Library of Congress Cataloging-in-Publication Data
Deitel, Paul J.
C : how to program / Paul Deitel, Deitel & Associates, Inc., Harvey Deitel, Deitel & Associates,
Inc., Abbey Deitel, Deitel & Associates, Inc. -- Seventh edition.
pages cm -- (How to program series)
ISBN 978-0-13-299044-8
1. C (Computer program language) 2. C++ (Computer program language) 3. Java (Computer program
language) I. Deitel, Harvey M., II. Deitel, Abbey. III. Title.
QA76.73.C15D44 2012
005.13'3--dc23
2011051087
10 9 8 7 6 5 4 3 2 1
ISBN-10: 0-13-299044-X
ISBN-13: 978-0-13-299044-8
In Memory of Dennis Ritchie,
creator of the C programming language
and co-creator of the UNIX operating system.
Paul and Harvey Deitel
Trademarks
DEITEL, the double-thumbs-up bug and DIVE INTO are registered trademarks of Deitel and Associates,
Inc.
MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS
ABOUT THE SUITABILITY OF THE INFORMATION CONTAINED IN THE DOCUMENTS
AND RELATED GRAPHICS PUBLISHED AS PART OF THE SERVICES FOR ANY PURPOSE.
ALL SUCH DOCUMENTS AND RELATED GRAPHICS ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND. MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS HEREBY
DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THIS INFORMA-
TION, INCLUDING ALL WARRANTIES AND CONDITIONS OF MERCHANTABILITY,
WHETHER EXPRESS, IMPLIED OR STATUTORY, FITNESS FOR A PARTICULAR PURPOSE,
TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL MICROSOFT AND/OR ITS
RESPECTIVE SUPPLIERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PER-
FORMANCE OF INFORMATION AVAILABLE FROM THE SERVICES.
THE DOCUMENTS AND RELATED GRAPHICS CONTAINED HEREIN COULD INCLUDE
TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODI-
CALLY ADDED TO THE INFORMATION HEREIN. MICROSOFT AND/OR ITS RESPECTIVE
SUPPLIERS MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/
OR THE PROGRAM(S) DESCRIBED HEREIN AT ANY TIME. PARTIAL SCREEN SHOTS
MAY BE VIEWED IN FULL WITHIN THE SOFTWARE VERSION SPECIFIED.
Contents
Appendices E through H are PDF documents posted online at the book’s Companion
Website (located at www.pearsonhighered.com/deitel).
Preface xix
2 Introduction to C Programming 40
2.1 Introduction 41
2.2 A Simple C Program: Printing a Line of Text 41
2.3 Another Simple C Program: Adding Two Integers 45
2.4 Memory Concepts 49
2.5 Arithmetic in C 50
2.6 Decision Making: Equality and Relational Operators 54
2.7 Secure C Programming 58
5 C Functions 158
5.1 Introduction 159
5.2 Program Modules in C 159
5.3 Math Library Functions 160
5.4 Functions 162
5.5 Function Definitions 162
5.6 Function Prototypes: A Deeper Look 166
5.7 Function Call Stack and Stack Frames 169
5.8 Headers 172
5.9 Passing Arguments By Value and By Reference 173
5.10 Random Number Generation 174
5.11 Example: A Game of Chance 179
5.12 Storage Classes 182
5.13 Scope Rules 184
5.14 Recursion 187
5.15 Example Using Recursion: Fibonacci Series 191
5.16 Recursion vs. Iteration 194
5.17 Secure C Programming 197
6 C Arrays 216
6.1 Introduction 217
6.2 Arrays 217
6.3 Defining Arrays 218
6.4 Array Examples 219
6.5 Passing Arrays to Functions 232
6.6 Sorting Arrays 236
6.7 Case Study: Computing Mean, Median and Mode Using Arrays 239
6.8 Searching Arrays 244
6.9 Multidimensional Arrays 249
6.10 Variable-Length Arrays 256
6.11 Secure C Programming 259
7 C Pointers 277
7.1 Introduction 278
7.2 Pointer Variable Definitions and Initialization 278
7.3 Pointer Operators 279
7.4 Passing Arguments to Functions by Reference 282
7.5 Using the const Qualifier with Pointers 284
7.5.1 Converting a String to Uppercase Using a Non-Constant
Pointer to Non-Constant Data 287
x Contents
13 C Preprocessor 517
13.1 Introduction 518
13.2 #include Preprocessor Directive 518
Contents xiii
22 Templates 823
22.1 Introduction 824
22.2 Function Templates 824
22.3 Overloading Function Templates 827
22.4 Class Templates 828
22.5 Nontype Parameters and Default Types for Class Templates 834
22.6 Wrap-Up 835
Index 930
xviii Contents
Appendices E through H are PDF documents posted online at the book’s Companion
Website (located at www.pearsonhighered.com/deitel).
lications and websites that will help you stay up to date with the latest technology
news and trends, and updated exercises. We’ve included test-drives that show how
to run a command-line C program on Microsoft Windows, Linux and Mac OS X.
• Secure C Programming Sections. We’ve added notes about secure C programming
to many of the C programming chapters. We’ve also posted a Secure C Program-
ming Resource Center at www.deitel.com/SecureC/. For more details, see the sec-
tion “A Note About Secure C Programming” in this Preface.
• Focus on Performance Issues. C (and C++) are favored by designers of perfor-
mance-intensive applications such as operating systems, real-time systems, em-
bedded systems and communications systems, so we focus intensively on
performance issues.
• “Making a Difference” Exercise Sets. We encourage you to use computers and the
Internet to research and solve problems that really matter. These exercises are
meant to increase awareness of important issues the world is facing. We hope
you’ll approach them with your own values, politics and beliefs.
• All Code Tested on Windows and Linux. We’ve tested every example and exercise
program using Visual C++ and GNU gcc in Windows and Linux, respectively.
• Updated Coverage of C++ and Object-Oriented Programming. We updated
Chapters 15–24 on object-oriented programming in C++ with material from our
textbook C++ How to Program, 8/e.
• Sorting: A Deeper Look. Sorting places data in order, based on one or more sort
keys. We begin our presentation of sorting with a simple algorithm in Chapter 6—
in Appendix E, we present a deeper look. We consider several algorithms and com-
pare them with regard to their memory consumption and processor demands. For
this purpose, we introduce Big O notation, which indicates how hard an algorithm
may have to work to solve a problem. Through examples and exercises, Appendix E
discusses the selection sort, insertion sort, recursive merge sort, recursive selection
sort, bucket sort and recursive Quicksort. Sorting is an interesting problem because
different sorting techniques achieve the same final result but they can vary hugely
in their consumption of memory, CPU time and other system resources.
• Titled Programming Exercises. All the programming exercises are titled to help
instructors tune assignments for their classes.
• Debugger Appendices. We’ve updated the Visual C++® and GNU gdb debugging
appendices.
• Order of Evaluation. We added cautions about order of evaluation issues.
• Additional Exercises. We added more function pointer exercises. We also added
a Fibonacci exercise project that improves the Fibonacci recursion example (tail
recursion).
• C++-Style // Comments. We use the newer, more concise C++-style // com-
ments in preference to C’s older style /*...*/ comments.
• C Standard Library. Section 1.7 references P.J. Plauger’s Dinkumware website
(www.dinkumware.com/manuals/default.aspx) where students can find thor-
ough searchable documentation for the C Standard Library functions.
A Note About Secure C Programming xxi
Web-Based Materials
This book is supported by substantial online materials. The book’s Companion Website
(www.pearsonhighered.com/deitel) contains source code for all the code examples and
the following appendices in searchable PDF format:
• Appendix E, Sorting: A Deeper Look
• Appendix F, Introduction to the New C Standard
xxii Preface
Dependency Charts
Figures 1 and 2 show the dependencies among the chapters to help instructors plan their
syllabi. C How to Program, 7/e is appropriate for CS1 and CS2 courses, and intermediate-
level C and C++ programming courses. The C++ part of the book assumes that you’ve
studied the C part.
C Chapter Introduction
Dependency 1 Introduction to Computers,
the Internet and the Web
Chart
[Note: Arrows pointing into a
chapter indicate that chapter’s Intro to Programming
dependencies.] 2 Intro to C Programming
Control Statements,
Functions and Arrays
3 Structured Program
Development in C
4 C Program Control
5 C Functions
6 C Arrays
Aggregate Types
10 C Structures, Unions, Bit
Manipulations and Enumerations
Data Structures
Other Topics and the New C Standard 5.14–5.16 Recursion
12 C Data Structures
13 C Preprocessor 14 Other C Topics F Intro to the New C Standard E Sorting: A Deeper Look
18 Classes: A Deeper
Look, Part 2
19 Operator Overloading
Object-Oriented
Programming
20 OOP: Inheritance
Teaching Approach
C How to Program, 7/e, contains a rich collection of examples. We focus on good software
engineering and stressing program clarity.
Syntax Shading. For readability, we syntax shade the code, similar to the way most IDEs
and code editors syntax color code. Our syntax-shading conventions are:
comments appear like this
keywords appear like this
constants and literal values appear like this
all other code appears in black
Error-Prevention Tips
These tips contain suggestions for exposing and removing bugs from your programs; many
describe aspects of C that prevent bugs from getting into programs in the first place.
Performance Tips
These tips highlight opportunities for making your programs run faster or minimizing the
amount of memory that they occupy.
Portability Tips
The Portability Tips help you write code that will run on a variety of platforms.
WHITE MAGIC
Before the days of Sherlock Holmes and the scientific pursuit of
clues the ways of tracing lost or stolen property were devious and
varied. In recent times the aid of St. Anthony of Padua has often
been invoked. Why that good Saint should have taken up this branch
of detective work I know not; possibly he was confused with his
namesake the hermit, whose pig might well have been trained to
search for lost articles as less holy pigs to hunt for truffles, or
possibly, as was said of the man who married five wives, ‘it was his
hobby.’ However this may be, I have known excellent results
obtained by the promise of a candle or the repetition of a
paternoster in honour of St. Anthony; the prayer is the more popular
offering, being cheaper for the petitioner and more certain for the
saint—the candle is apt to be withheld when the property has been
recovered, and candles have even been known to go astray and
blaze before the altar of the other St. Anthony, who was probably
too busy in pre-Reformation days looking after the cattle of his
devotees to trouble about lost property. The man, therefore, who
would have supernatural assistance in the recovery of his strayed
goods had perforce to seek the aid of sorcerers and their familiar but
often incompetent spirits. Unfortunately for the modern inquirer no
unsolicited testimonials bearing witness to the efficacy of these
magicians appear to have survived, and it is only their failures that
brought them into unpleasant and enduring prominence.
London was naturally a great centre of these occult detectives, and
they seem to have been well patronised. In 1390 when two silver
dishes were stolen from the Duke of York’s house, application was
made to one John Berkyng, a renegade Jew, who performed certain
incantations, and as a result accused one of the Duke’s servants,
William Shadewater. In the same way, when Lady Despenser’s fur-
lined scarlet mantle was stolen, about the same time, Berkyng had
no hesitation in denouncing Robert Trysdene and John Geyte. His
repute was no doubt considerable, but these two cases proved
disastrous; the parties accused had him arrested, and he was found
guilty of deceit and defamation, stood in the pillory for an hour, and
was then banished from the city.
In this case nothing is said as to the means of divination employed,
but in two cases that occurred in London in 1382 particulars are
given. When Simon Gardiner lost his mazer bowl he employed a
German, Henry Pot by name, to trace it. He made thirty-two balls of
white clay, and after appropriate incantations named Nicholas
Freman and Cristine, his wife, as the thieves. Here again the mistake
brought the magician to the pillory, and the same fate befell Robert
Berewold. In this case also it was a mazer that had been stolen;
Maud of Eye was its owner, but a friend of hers, one Alan, a water
carrier, who had evidently a high opinion of Robert’s power, called
him in. Robert then took a loaf and fixed in the top of it a round peg
of wood and four knives at the four sides of the same, in the shape
of a cross; his further proceedings are vaguely described as ‘art
magic,’ and resulted first in the accusation of Joan Wolsey and
eventually in the appearance of Robert Berewold in the pillory with
the loaf hanging round his neck.
The connection between mazers and magic is not obvious, but in
1501 when John Richardson, a parish clerk, lost a mazer worth 26s.
he at once sought the assistance of Nicholas Hanwode, ‘bringing
with him divers young children for to behold in a looking-glass.’ The
record is damaged, but is sufficiently legible to show that the victim
was arrested and imprisoned by the mayor and could only invoke the
intervention of the Court of Chancery against his accusers. In this
last case we have clearly an instance of divination by the glass,
crystal, or similar medium—a pool of ink was used, if I remember
right, by the Indians in The Moonstone. The loaf and knives seem
vaguely familiar to me as instruments of divination, though I should
be puzzled to give the correct ceremonial, but the thirty-two clay
balls are more difficult to place, unless possibly they were used for
the construction of some kind of geomantic figure.
Robert Berewold in the pillory.
BLACK MAGIC
Considering how large a part magic and the supernatural played in
the life of the people in the Middle Ages it is curious that there
should be so few references thereto in the English judicial records
prior to the Reformation. The ancient chroniclers and historians
enlivened many a dull page with the most astonishing tales of sin
and mystery, vouched for on the testimony of their own eyes or of
unimpeachable witnesses, but the chains of legal evidence are as
powerless to bind these legendary sorcerers as were the triple
chains of iron to bind the famous Witch of Berkeley. With the
exception of general vague accusations of witchcraft levelled against
the Lollards and kindred heretics, references to magic are casual and
rare in the records of our courts.
With the reign of Elizabeth this ceases to be true, and from the
middle of the sixteenth century to the end of the seventeenth the
Black Arts attracted their full share of judicial and magisterial
attention. Probably twenty instances of legal proceedings taken in
connection with these ‘ungodly practices’ could be produced after
the Reformation for every one prior to that date, and while this is in
part due to the fact that local records of the later periods have
survived in far greater number than their predecessors, there is a
possibility that post hoc is in the case also propter hoc. It is arguable
that the Reformation having abolished, for all practical purposes,
belief in the miracles of God and His saints, the natural craving of
the unscientific man for a supernatural explanation of the abnormal
could only be satisfied by a belief in the miracles of the Devil and his
sinners. Be that as it may, the fact remains that after the
Reformation witches and warlocks became as common as holy nuns
and anchorities had once been—the marvels reported of the one
class are about as unsatisfactory from a scientific point of view as
those of the other. It is, however, with a few chance references of
earlier date that I am concerned.
Suitably enough it is from the land of ‘Cunning Murrell’ that my
earliest instance comes. The Sheriff of Essex in 1169 made a note of
having expended 5s. 3d. on ‘a woman accused of sorcery.’ The
record is brief and unsatisfactory, telling neither the details of the
offence, the method of trial, nor the result. These two last items we
get in another case which occurred in Norfolk in 1208, when Agnes,
wife of Odo the merchant, appealed a certain Galiena for sorcery,
and Galiena successfully cleared herself by the ordeal of the hot
iron. For a century after this any magical offenders who may have
been brought to trial have eluded my search. Then in 1308 began
the proceedings against the Knights Templars, based very largely on
accusations of practising Black Magic. In England, however, nothing
of the kind was even held to have been proved against the knights,
although not only ‘what the sailor said’ was considered to be
evidence, but also what the clerk thought the priest said the soldier
heard the sailor say.
‘... thrust a leaden bodkin into
the head of that image.’
It is rather remarkable that the year 1324, in which the great Irish
trial of the Lady Alice Kyteler took place, was the date of the fullest
and in many ways the most interesting of the early English trials for
sorcery. In that year Robert Marshall of Leicester, under arrest for a
variety of offences, endeavoured to save his own neck by turning
King’s evidence and accusing his former master, John Notingham,
and a number of Coventry citizens of conspiring to kill the King, the
two Despensers, and the Prior and two other officials of Coventry by
magical arts. Marshall’s tale was to the effect that the accused
citizens came to John Notingham, as a man skilled in ‘nigromancy,’
and bargained with him for the death of the persons named, paying
a certain sum down and giving him seven pounds of wax. With the
wax Notingham and Marshall made six images of the proposed
victims and a seventh of Richard de Sowe, the corpus vile selected
for experimental purposes. The work was done in secret in an old
deserted house not far from Coventry, and when the images were
ready the magician bade his assistant thrust a leaden bodkin into the
head of that image which represented Richard de Sowe, and next
day sent him to the house of the said Richard, whom he found
raving mad. Master John then removed the bodkin from the head of
the image and thrust it into the heart, and within three days Richard
died. And at that point Robert Marshall’s story comes to a lame and
impotent conclusion. Not a word of explanation does he give as to
why, when the preliminary experiment had proved so successful,
they did not go on with their fell design. The unfortunate
‘nigromancer’ died in prison before the case had been thrashed out
and reported upon by a jury, and the case against the citizens was
allowed to fall through. Even if the trial had followed its normal
course it is not probable that we should have had more than a plain
and enlightening verdict of ‘not guilty,’ for Robert Marshall was a liar
of inventive genius. He accused two men of assisting him in the
robbery and murder of a merchant from Chester ‘in Erlestrete,
Coventry, near the white cellar,’ with a profusion of ‘corroborative
detail, intended to give artistic verisimilitude to an otherwise bald
and unconvincing narrative,’ which proved, as he afterwards
admitted, utterly false. One or two other wild accusations also came
to nothing, and Robert was duly hanged. But while we cannot say
that the procedure he described was actually used in this case, we
know it was quite in accord with the orthodox methods of magicians.
That the story was believed at the time we may conclude, as the
younger Despenser wrote this year to the Pope complaining that he
was threatened by magical and secret dealings. The Pope, with
much good sense, recommended him to turn to God with his whole
heart and to make a good confession and such satisfaction as should
be enjoined upon him; adding that no other remedies were needful.
Passing again over a century we find in 1426 William, Lord Botreaux,
complaining that Sir Ralph Botreaux, William Langkelly, and others,
‘unmindful of the salvation of their souls and not having God before
their eyes,’ had procured John Alwode of Trottokeshull, Hugh Bower
of Kilmington, chaplain, and John Newport, who were said to
practise soothsaying, necromancy, and art magic, ‘to weaken, subtly
consume, and destroy by the said arts,’ the complainant’s body.
Commissioners were appointed to inquire into the matter, but any
further proceedings that there may have been have vanished, or at
best are lying hid in some unsuspected corner of the Record Office.
Another instance of the use of magical ceremonies with evil intent is
alluded to fifty years later, when John Knight, chaplain, complained
that he had been arrested and committed to the Marshalsea for
going with the servants of ‘the Lord Straunge’ to search the house of
Alice, wife of John Huntley, ‘which of long tyme hath used and
exercised the feetes of wychecraft and sorcery,’ in Southwark. They
went into ‘an house called the lasour loke in Suthwerk in Kenstrete’
(a hospital founded originally for lepers, but by this time used more
as an almshouse or infirmary) ‘and there found dyvers mamettes for
wychecraft and enchauntements with other stuff beryed and deeply
hydd under the erthe.’ The circumstances are very similar to those
related in the case of an old woman turned out of the almshouses at
Rye in 1560 for using magical ceremonies, including the burial of
pieces of raw beef, to the intent that as the beef decayed away so
might the bodies of her enemies, though it is possible that in the
case of Alice Huntley the objects had only been buried for secrecy.
Five-and-twenty years later, in 1502, a still clearer case of the use of
‘mamettes’ or images occurred in Wales. The bishop of St. Davids,
having vainly remonstrated with Thomas Wyriott and Tanglost
William for living ‘in advoutre,’ imprisoned the woman Tanglost and
afterwards banished her from the diocese. She went to Bristol, and
hired one Margaret Hackett, ‘which was practized in wychecraft,’ to
destroy the bishop. Tanglost and Margaret then went back to
Wyriott’s house, and in a room called, most unsuitably, Paradise
Chamber, made two images of wax, and then, possibly thinking that
a bishop would take more bewitchment than an ordinary mortal,
sent for another woman, ‘which they thought cowde and hadde
more cunning and experiens than they,’ and she made a third image.
The bishop was not a penny the worse for this ‘inordinat delying,’
but ordered the arrest of Tanglost for heresy; Wyriott intervened by
getting her imprisoned through a trumped-up action for debt, in
order to keep her out of the bishop’s clutches, and the bishop had to
invoke the assistance of the Court of Chancery.
Three cases of magic occurred in 1432. On May 7 of that year an
order was issued for the arrest of Thomas Northfelde, D.D., a
Dominican friar of Worcester, and the seizure of all his books treating
of sorcery or wickedness, and two days later Brother John Ashwell of
the Crutched Friars, London, John Virley, priest, and Margery
Jourdemain, who had been imprisoned at Windsor for sorcery, were
released. In these cases it is very likely that the sorcery consisted in
an uncanny and suspicious addiction to unusual branches of
learning, combined possibly with experiments in chemistry or
heretical tendencies, both alike dangerous in the eyes of the
orthodox, but the third case was clearly a matter of bewitchment—in
the opinion of the victim. The facts are quite simple. John Duram of
York had a field with a pond in it, and having in some way incurred
the enmity of Thomas Mell, a farmer, the latter, ‘per divers artes
erroneous et countre la foy catholice cest assavoir sorcery,’ withdrew
the water from John’s pond, to the great injury of his cattle, besides
certain other unnamed injuries wrought by his ‘malveys ymaginacion
et sotell labour.’ Mell being under the patronage of men of influence
because of his magical abilities, Duran did not dare to bring an
action against him in the ordinary court, and therefore sought the
intervention of the Court of Chancery, with what success I do not
know.
So far my magicians, it must be admitted, have been rather
commonplace people, proceeding on the usual lines of their craft
and displaying little originality, but my final instance is, so far as I
know, unique. In an eighteenth-century manuscript in my
possession, formerly in the Phillipps collection, amongst a mass of
extracts from all kinds of records is an entry said to be taken from
the court rolls of the manor of Hatfield in Yorkshire. According to
this, at a court held in 1336 Robert of Rotheram brought an action
against John de Ithen for breach of contract, alleging that on a
certain day, at Thorne, John agreed to sell him for threepence-
halfpenny ‘the Devil bound with a certain bond’ (Diabolum ligatum in
quodam ligamine), and Robert thereupon gave him ‘arles-penny,’ or
earnest-money (quoddam obolum earles), ‘by which possession of
the said Devil remained with the said Robert, to receive delivery of
the said Devil within four days,’ but when he came to John the latter
refused to hand over the Devil, wherefore Robert claimed 60s.
damages. John appeared in court and did not deny the contract, but
the steward, holding that ‘such a plea does not lie between
Christians,’ ‘adjourned the parties to Hell for the hearing of the case,’
and amerced both parties.
The first question is, is this a genuine extract from the rolls? The
critic who is inclined to think that he smells a rat may be confuted by
Camden, according to whom no rats have ever been known in the
town of Hatfield. The extremely solid nature of all the other extracts
in my volume is almost a guarantee of good faith so far as the
eighteenth century copyist is concerned, and the probability that he
took it from the original is strengthened by his having in one place
misread unde as vide and subsequently corrected the error. But
allowing that it occurred on the rolls, was it a genuine transaction or
was it a facetious invention of the manor clerk? I incline to believe
that it was genuine. A man who invented such a case to fill up a
blank space on the roll would have been almost certain to have
elaborated it further, while, on the other hand, having noted the
adjournment of the case to ‘another place,’ to use parliamentary
language, he would not have been likely to add that both parties
were fined. Granting that the action was actually brought, we are
left in doubt whether Robert was a simple gull with whom John had
been amusing himself, or whether the defendant really believed that
he could fulfil his contract. Again, what was that contract? Latin,
though admirably clear in many respects, suffers from the absence
of the definite article, and it is difficult to be certain whether it was a
question of ‘the Devil’ or ‘a devil’; judging by the price, the latter
seems more probable, as threepence-halfpenny for the Prince of
Darkness seems absurdly little, and I believe that Diabolus ligatus
was sometimes applied to a divining spirit imprisoned by magic arts
in a bottle or crystal. However that may be, it is not probable that a
law court has ever before or since been asked to decide the question
of proprietary rights in the devil or his imps.
‘Diabolus ligatus.’
II
HIGHWAYS
Hugh de Vere and his suite, consisting of two knights, two chaplains,
a clerk, ten esquires, and some thirty grooms and other attendants,
assembled at Paris on Good Friday, April 4, 1298, and next day rode
as far as Rozoy, contenting themselves on the journey, as it was a
fast day, with fish and fruit. The next day being Easter Sunday they
did not start until after dinner, but reached Provins, fifty miles south-
east of Paris, in the evening. From Provins of the Roses the
cavalcade passed by Pavillon down the valley of the Seine to Bar-
sur-Seine, where, Lent being over, they feasted on meat and pies
and flauns, a kind of mediæval pancake particularly popular at
Easter-time, according to Haliwell. They soon entered Burgundy, and
turning south through Montbard followed for some distance the
route now taken by the Canal de Bourgogne with its innumerable
locks, and after halting a night at ‘Flori’—which occurs in
Bolingbroke’s account as ‘Floreyn,’ but would seem to have dwindled
out of the maps if not out of existence—reached Beaune; and still
doing an average of thirty miles a day came to Lyons, stopping at
Tournus and Bellville on the way, on Monday, April 14. After
following the valley of the Rhone a few miles farther south, they
turned off eastwards near Vienne through St. Georges to Voiron and
thence northwards, passing close to the Grande Chartreuse, across
the borders of Savoy to Chambéry. So far the currency in use had
been ‘neir Turneis,’ or black money of Tours, 14d. of ‘petit tournois’
being equivalent to one ‘gros tournois,’ the standard to which all
other denominations are reduced in these accounts, a coin worth
approximately 3d. sterling; but now and all the way through Savoy
and Piedmont payments are entered in ‘Vieneys,’ of which seventeen
went to the ‘gros tournois.’
Through the mountainous district of Savoy progress was markedly
slower, the sixty miles from Chambéry to Susa taking six days. The
road by which they travelled followed the valley of the Arc, as does
the modern railway, past Montmélian, la Chambre, and St. Michel;
but as the Mont Cenis tunnel had not then been completed the
ambassador and his suite had to go farther east to Lansle Bourg,
toiling up Mont Cenis to the hospice founded on that storm-swept
road by the pious King Louis, first of his name, and then dropping
down to Piedmont and the ancient town of Susa, where after the
hardships of the day’s journey they regaled themselves with ‘tartes
et flaunes.’ Whether it was the climbing or the flauns I do not know,
but next day Sir Hugh’s palfreman was ill, and another servant had
to be put in his place at Avigliano. On Friday, April 25, Turin was
reached, and a stay was made here until the following Tuesday, a
rest that must have been welcome after three weeks’ continuous
travelling. Portmanteaux and bags were repaired, clothes washed,
and bodies reinvigorated by a more varied choice of food than was
possible while travelling; shoulders of mutton, pigeons, chickens,
figs, grapes, and other fruit were bought, and the cook prepared
‘charlet,’ evidently an ancestress of the aristocratic Charlotte Russe
rather than of her plebeian namesake Apple Charlotte, as the
constituents were milk and eggs. The journey was resumed on
Wednesday, April 30, the route lying eastwards through Chivasso
and Moncalvo to an unidentifiable place, ‘Basseignanh,’ evidently just
across the Po in Lombardy, as here the coinage becomes ‘emperials,’
of which it required twenty to make a ‘gros tournois.’ Lomello, Pavia,
Piacenza, Borgo San Donnino (where for the first time we note a
purchase of cheese, for which the district is still famous), Parma,
Reggio, and Modena follow in uneventful succession, but instead of
continuing along the same line to Bologna, as does the modern
traveller, the embassy now turned sharply to the south-west to
Sassuolo. In this more countrified district the rate of exchange fell,
and the ‘gros tournois’ was only worth eighteen instead of twenty
‘emperials,’ but as a compensation the accountant notes under
Frassinoro, the next station on the road through the picturesque
valley of the Secchia, that the expenses of four days were small,
thanks to the presents of ‘la Marcoys.’ I am not clear as to the
identity of this Marquess; all this part of Italy was a mass of little
lordships and semi-independent principalities, but for the most part
their lords were Dukes. The Marquess of Carrara seems a reasonable
suggestion—if I am right in thinking that there was such a person,
and am not confusing him with the Marquess of Carabas, who, from
his occurrence in the history of Puss in Boots, was presumably a
noble of Catalonia. Lucca was reached on the eve of Ascension Day,
and the feast itself was spent at Pistoia, where the coinage in use
was ‘Pisans,’ the ‘gros tournois’ being worth 4s. 2d. of Pisan money.
The same currency continued in use in Florence and Siena, after
which ‘curteneys’ are introduced, the ‘gros tournois’ being worth 5s.
of this money, which, however, was only in use for two days, during
which halts were made at Acquapendente and Santa Cristina, a town
on the shore of the Lake of Bolsena, which name commemorates
that saint’s escape from martyrdom by drowning, thanks to the
miraculous buoyancy of her millstone, on which she floated to shore
as St. Piran floated on his stone to the delectable duchy of Cornwall.
After this the accounts are kept at Viterbo in ‘paperins,’ 3s. 4d. of
papal money being equivalent to the ‘gros tournois,’ changing next
day, for the last time on the way out, to ‘provis,’ at 2s. 10d. Passing
Sutri and Isola, Rome was reached on Whit Monday. Here they
found Master Thomas of Southwark, who had been sent on ahead to
hire lodgings and furniture, and here they spent six weeks.
‘St. Piran.’
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.
ebookname.com