Scientific Programmer's Toolkit
eBook - ePub

Scientific Programmer's Toolkit

Turbo Pascal Edition

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Scientific Programmer's Toolkit

Turbo Pascal Edition

About this book

The Scientific Programmer's Toolkit: Turbo Pascal Edition presents a complete software environment for anyone writing programs in mathematical, engineering, or science areas. This toolkit package is designed for use with Turbo Pascal, the de facto standard Pascal system for PC and compatible machines. The book and its software provides an integrated software library of programming tools. The programs and routines fall into three categories: graphical, mathematical, and utilities. Routines are further subdivided into three levels that reflect the experience of the user. For graphics and text handling routines there is also a Level 0, which provides an interface to the machine operating system. By using hierarchically structured routines, the clearly written text, and a wide range of example programs, software users can construct a user-friendly interface with minimal effort. The levels structure makes it easy for newcomers to use the Toolkit, and with growing experience, users can achieve more elaborate effects. The Scientific Programmer's Toolkit will be useful to consultants, researchers, and students in any quantitative profession or science, in private or public sector research establishments, or in secondary and higher education.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Scientific Programmer's Toolkit by M.H Beilby,R.D Harding,M.R Manning in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming Languages. We have over one million books available in our catalogue for you to explore.

Information

Chapter 1 Introducing the Toolkit

DOI: 10.1201/9781003072911-1

1.1 Preliminary

We have designed the Toolkit to be used by people with widely different amounts of computer knowledge. It includes some ready-to-run programs, which require no programming skill, and solve a number of useful problems. But the Toolkit also provides experienced programmers with many flexible and powerful facilities. Much of the Toolkit lies between these two extremes, with the more powerful facilities requiring more skill to exploit. Regardless of your computer experience, we hope you will still find the Toolkit very useful.

1.2 Toolkit levels

To represent the diversity of code within the Toolkit, we have divided it into levels, with the higher levels being the simpler to use. The Toolkit is divided into four levels, as follows:
  • Level 3 consists of the ready-to-run programs. You do not need any computer experience to use these, and can run them on any PC-compatible system, regardless of whether or not Pascal is available.
  • Level 2 consists of Pascal units. These contain code to solve mathematical problems; to draw a variety of graphs; and to display ā€˜windows’ on the screen. They are designed to be quick and easy to use. For example, the Level 2 procedure draw_curve2 draws a graph of f(x) against x, given only f, and a few other parameters.
  • Level 1 consists, again, of Pascal units. These contain more basic code, which, although more flexible than the Level 2, requires more effort to use. For example, the Level 1 graphics routines allow you to draw far more general graphs (for example, in non-orthogonal coordinate systems). However, they cannot plot a function; you have to use much more basic facilities which can only draw straight lines.
  • Level 0 consists of the Pascal units used internally by the Toolkit itself; although these contain useful code (such as a tan function), they are always used in conjunction with the other levels.
The Toolkit is designed so that code from various levels will work together; it is quite in order, for instance, to perform a calculation with a Level 2 mathematics routine, and plot the results using a Level 1 graphics routine.
Let us now introduce the levels in more detail.

1.2.1 Level 3

Although the entire Toolkit is written in the programming language Pascal, you do not need to know Pascal (or, indeed, any other language) to run Level 3 of the Toolkit. Level 3 code is ready to run on any computer compatible with an IBM-PC; it does not even need to have a Pascal system available.
If you only intend to use Level 3 of the Toolkit, you can stop reading this chapter now, and move immediately to Chapter 2, which describes the Level 3 code in detail.

1.2.2 Level 2

Level 2 of the Toolkit contains the ā€˜building blocks’ from which Level 3 is built. Having access to them enables you to solve problems of your own choosing, and modify the Toolkit’s behaviour precisely as you wish. Because Level 2 of the Toolkit is written in Pascal (as are the lower levels), your computer must run the Turbo Pascal system, version 4.0 or above, and you will need to do some programming yourself. But the Level 2 code has been designed to be easy to use, and simple to incorporate into your own code. Level 2 is divided into seven units, which, in turn, relate to three different areas: numerical mathematics; graphics; and windowing. We describe the units in this order below:
  • Code for numerical mathematics is to be found in the units Cit_math and Cit_matr, which are fully described in Chapters 4 and 5, respectively.
  • Cit_math provides a number of routines for scalar mathematics. These find the zeroes and minima of functions; fit splines to curves; evaluate integrals (with several different methods available); solve ordinary differential equations (again, with a choice of method); and calculate fast Fourier transforms.
  • Cit_matr contains code for matrix mathematics. This includes the solution of linear equations; decomposition and inversion of matrices; and the evaluation of matrix eigenvalues and eigenvectors. Once again, a choice of methods is provided for most of these operations.
  • The graphics routines are to be found in the unit Cit_draw, which is fully described in Chapter 3.
  • Cit_draw contains routines to plot functions or data values in two and three dimensions; draw contours and surfaces; and sample function values in one, two or three dimensions.
  • The code for windowing is divided between four units: Cit_ctrl, Cit_disp, Cit_edit and Cit_menu. These units provide a convenient set of default windows, and facilities to display, modify, and input values within them. A full description of these units is given in Chapter 6.
  • Cit_ctrl contains code for program control in a windowing environment. It declares a convenient set of default windows; displays error messages and help information; and provides the ā€˜option menus’ from which the user can make a choice.
  • Cit_disp contains routines which display numbers and text within a window, with full control over the format of the output.
  • Cit_edit contains code which either inputs or edits values within windows. These values may be numbers, strings, or expressions.
  • Cit_menu provides a ā€˜menu’ facility, from which the user can select a number of options. The help facilities in Cit_ctrl can be called automatically if required.

1.2.3 Level 1

Level 1 of the Toolkit consists, again, of Pascal code. The Level 1 code is just as easy to incorporate into your programs as Level 2 code, and requires no more knowledge of Pascal. The difference is that the facilities provided by Level 1 are at a more primitive level than those provided by Level 2. As we said earlier, the Level 2 graphics code contains a procedure which plots a function; but the Level 1 graphics code can only draw straight lines. Obviously, a function-plotting procedure can be written which draws a number of straight lines to approximate the required curve (and this is exactly what the Level 2 routine does); but it requires more effort on your part.
The advantage of using the Level 1 code is that you have far more control over the results, and can produce effects which are not possible using Level 2: you could, for example, plot a function in a non-orthogonal coordinate system. Level 1 consists of five units, which we describe briefly below:
  • Cit_eval contains code which evaluates an arbitrary expression, held in a string, and returns its value.
  • Cit_form contains routines which display a floating-point value as a string in a number of styles; they provide a wider selection of formats than the Pascal procedure Write.
  • Cit_grap contains the lower-level graphics routines; these draw lines, axes and polygons, and convert between user and screen graphics coordinates.
  • Cit_text contains routines for handling strings of arbitrary length; a Pascal string variable has a fairly small upper bound to the number of characters it can hold.
  • Cit_wind contains the lower-level windowing routines; these define, save and reload windows, ...

Table of contents

  1. Cover Page
  2. Half Title Page
  3. Title Page
  4. Copyright Page
  5. Contents
  6. Acknowledgements
  7. Guide to installing the software
  8. Guide to running the software
  9. Introduction
  10. Chapter 1 Introducing the Toolkit
  11. Chapter 2 Level 3 Programs
  12. Chapter 3 Graphics Routines
  13. Chapter 4 Mathematical Routines I
  14. Chapter 5 Mathematical Routines II
  15. Chapter 6 Windows and Menus
  16. Chapter 7 Graphics Routines
  17. Chapter 8 Screen and Text Utilities
  18. Chapter 9 Formatting Values and Evaluating Expressions
  19. Appendix 1 Unit Cit_core
  20. Appendix 2 Unit Cit_prim
  21. Appendix 3 Table of Error Messages
  22. Index