A Concurrent PASCAL Compiler for Minicomputers

Total Page:16

File Type:pdf, Size:1020Kb

A Concurrent PASCAL Compiler for Minicomputers 512 Appendix A DIFFERENCES BETWEEN UCSD'S PASCAL AND STANDARD PASCAL The PASCAL language used in this book contains most of the features described by K. Jensen and N. Wirth in PASCAL User Manual and Report, Springer Verlag, 1975. We refer to the PASCAL defined by Jensen and Wirth as "Standard" PASCAL, because of its widespread acceptance even though no international standard for the language has yet been established. The PASCAL used in this book has been implemented at University of California San Diego (UCSD) in a complete software system for use on a variety of small stand-alone microcomputers. This will be referred to as "UCSD PASCAL", which differs from the standard by a small number of omissions, a very small number of alterations, and several extensions. This appendix provides a very brief summary Of these differences. Only the PASCAL constructs used within this book will be mentioned herein. Documents are available from the author's group at UCSD describing UCSD PASCAL in detail. 1. CASE Statements Jensen & Wirth state that if there is no label equal to the value of the case statement selector, then the result of the case statement is undefined. UCSD PASCAL treats this situation by leaving the case statement normally with no action being taken. 2. Comments In UCSD PASCAL, a comment appears between the delimiting symbols "(*" and "*)". If the opening delimiter is followed immediately by a dollar sign, as in "(*$", then the remainder of the comment is treated as a directive to the compiler. The only compiler directive mentioned in this book is (*$G+*), which tells the compiler to allow the use of GOTO statements. The UCSD compiler does not 513 handle nested comments correctly. 3. EOF(F) To set EOF to TRUE for a textfile F, including the standard INPUT file, the user must press the <ETX> or <ENTER> key (CONTROL-C on a keyboard lacking an explicit key for that purpose). The specific code used for this purpose may be altered from <ETX> if desired. If the file F is closed, then EOF returns TRUE. If EOF is TRUE, and the file is of <type> TEXT, then EOLN is also true for the same file. Following RESET(F), EOF will return FALSE if the file is present. The system automatically performs a RESET on the files INPUT, OUTPUT, and KEYBOARD when a program is initialized. 4. EOLN(F) EOLN(F) is defined only if F is a file of <type> TEXT. EOLN becomes TRUE only following a READ during which the end-of-line character «RET> by default) is received, and before the next READ. 5. GOTO and EXIT(P) statements UCSD PASCAL only allows a GOTO within the same <block> that contains the declaration of the target label. EXIT provides a limited capability equivalent to GOTO with a target label immediately following the point where the procedure P was called most recently. See Appendix C for further discussion of E) :T. GOTO is disabled by default in UCSD PASCAL when the system is initialized for student use. It can be enabled using the compiler directive (*$G+*). 514 6. Packed Variables UCSD PASCAL supports packed arrays of characters, and packed RECORD <type)'s. Characters are packed two to a 16-bit word. Within a record, packing and unpacking are performed automatically within groups of fields that are at most 16-bits wide. UCSD PASCAL has no equivalent of the built-in procedures PACK and UNPACK described by Jensen & Wirth. 7. Procedures and Functions as Formal Parameters UCSD PASCAL does not support the use of Procedure or Function identifiers as parameters. One exception is the EXIT built-in procedure. 8. Program Headings In the early releases of UCSD PASCAL, the list of standard file names in the PROGRAM line must not be included as pseudo parameters. Later releases will include this mechanism on an optional basis for use with the X(ecute) command of the operating system. 9. READ and READLN Jensen & Wirth define READ(F, CH) to be equivalent to the sequence CH := FAj GET(F)j In UCSD PASCAL this sequence is reversed when F is either of the standard console input files INPUT or KEYBOARD. Without this change, it would be extremely awkward to write programs which interact closely with the user. 515 10. RESET(F) In UCSD PASCAL, RESET(F) points the file window to the start of a file, but does not load the window variable FA. Thus the UCSD equivalent to the standard definition is: RESET(F)j GET(F)j 11. REWRITE(F) UCSD PASCAL does not support the standard procedure REWRITE. OPENNEW provides similar facilities. 12. Sets In UCSD PASCAL a set may have a maximum of 255*16 elements, i.e. a set may be up to 255 16-bit words in size. All of the set operations described by Jensen & Wirth are supported. 13. STRING variables UCSD PASCAL has a predeclared <type) STRING. A variable of <type) STRING is essentially a PACKED ARRAY[1 •• 80] OF CHAR, with an associated length attribute of <type> INTEGER. The default length of 80 characters may be overridden by a declaration which specifies the desired maximum length within square brackets, as in: TITLE: STRING[30]j where the absolute maximum length supported is 255 characters. The use of STRING variables is described extensively in this book. 14. WRITE and WRITELN UCSD PASCAL differs from the standard in not supporting parameters of <type) BOOLEAN for WRITE and WRITELN statements. Parameters of <type) STRING produce the results described in the body of 516 this book. 15. Turtle Graphics The Turtle graphics facilities described in this book and supported in UCSD PASCAL have no counterpart in the standard language. 517 Appendix B GLOSSARY OF COMPUTER JARGON This glossary presents a list of words and terms used in this book with meanings different from everyday usage. With each term is a very brief reminder about its meaning. For a more extensive discussion of the term, see the «chapter> • <section» referred to with each term. For example, (11.5) refers to Chapter 11 Section 5. Activate (11.5) A procedure or function is said to be activated when it is called and begins executing. It is no longer active after it terminates normally, or via use of the EXIT statement. A recursive procedure or function may activate several "copies" of itself concurrently. Actual Parameter (2.5) An actual parameter is a <variable> or <expression> supplied as part of a call to a procedure or function, thus replacing the formal parameter which appeared as part of the procedure or function declaration. Address (5.4) The address of a word in the computer's memory can be thought of as the number of the register containing the word. Algorithm (0.2) A statement describing a sequence of actions needed to perform a specific task. Analog Computer (5.2) Term applying to a class of machines that use electrical signals, mechanical levers, pneumatic pressure, or other similar means to simulate the behavior of other systems. 518 Argument (4.9) A data value to be used as an actual parameter. Arithmetic Expression (2.9) The PASCAL means of combining operands with numeric values to perform the arithmetic operations of addition, subtraction, multiplication and/or division. Array (8.2) A data structure which may contain many items (called "elements") of the same <type>. ASCII (5.2) The American national Standard Code for Information Interchange. An arbitrary assignment of numeric values to 96 displayable characters, and 32 control signals. Assembler Language (5.3) A method of programming a computer similar to using machine language, except that the user refers to each operation using an abbreviated descriptive identifier, rather than with numeric codes directly. Assembler language is translated into machine language by a program called an "assembler". Assertion (6.5) A statement of fact, the truth or falsehood of which will be tested within an algorithm. Assign (2.7), Assignment Operator (2.8), Assignment Statement (2.7) Assignment of a value to a variable causes that value to replace whatever value, if any, was previously stored in the memory location named by the variable. The assignment operator (":=") is the PASCAL symbol identifying an assignment statement which calls for the variable on the left of the operator to be assigned a new value. 519 Backspace (7.4) A key found on most keyboards. Generally used to indicate that the cursor pointing at the current text location should be backed up one space. Not all hard copy output devices support this feature. If the key is missing, <control-H> usually has the same effect. Batch (7.3) Term used to describe the manner in which programs are executed on a computer system (generally large) which accepts its input in the form of a deck of punched cards, and gives output to users in printed form on paper. Binary Search (13.5) A searching process in which the set of data items is cut roughly in half, then the half containing the item sought is cut in half, then the quarter containing the item sought is cut in half, and so on. Bit (5.2) A binary digit, whose value may be either 0 or 1. Bit Map (12.6) Term used to describe a graphic display device which creates images by providing a large number of positions where a program may turn a bright spot on or off. Bug (1.10) A logical error in a program, which causes the program to stop abnormally or to give incorrect results. Built-In (2.11) Adjective referring to pre-declared procedures and functions which are supplied as part of a software system.
Recommended publications
  • Chapter 5 Names, Bindings, and Scopes
    Chapter 5 Names, Bindings, and Scopes 5.1 Introduction 198 5.2 Names 199 5.3 Variables 200 5.4 The Concept of Binding 203 5.5 Scope 211 5.6 Scope and Lifetime 222 5.7 Referencing Environments 223 5.8 Named Constants 224 Summary • Review Questions • Problem Set • Programming Exercises 227 CMPS401 Class Notes (Chap05) Page 1 / 20 Dr. Kuo-pao Yang Chapter 5 Names, Bindings, and Scopes 5.1 Introduction 198 Imperative languages are abstractions of von Neumann architecture – Memory: stores both instructions and data – Processor: provides operations for modifying the contents of memory Variables are characterized by a collection of properties or attributes – The most important of which is type, a fundamental concept in programming languages – To design a type, must consider scope, lifetime, type checking, initialization, and type compatibility 5.2 Names 199 5.2.1 Design issues The following are the primary design issues for names: – Maximum length? – Are names case sensitive? – Are special words reserved words or keywords? 5.2.2 Name Forms A name is a string of characters used to identify some entity in a program. Length – If too short, they cannot be connotative – Language examples: . FORTRAN I: maximum 6 . COBOL: maximum 30 . C99: no limit but only the first 63 are significant; also, external names are limited to a maximum of 31 . C# and Java: no limit, and all characters are significant . C++: no limit, but implementers often impose a length limitation because they do not want the symbol table in which identifiers are stored during compilation to be too large and also to simplify the maintenance of that table.
    [Show full text]
  • The Linux Kernel Module Programming Guide
    The Linux Kernel Module Programming Guide Peter Jay Salzman Michael Burian Ori Pomerantz Copyright © 2001 Peter Jay Salzman 2007−05−18 ver 2.6.4 The Linux Kernel Module Programming Guide is a free book; you may reproduce and/or modify it under the terms of the Open Software License, version 1.1. You can obtain a copy of this license at http://opensource.org/licenses/osl.php. This book is distributed in the hope it will be useful, but without any warranty, without even the implied warranty of merchantability or fitness for a particular purpose. The author encourages wide distribution of this book for personal or commercial use, provided the above copyright notice remains intact and the method adheres to the provisions of the Open Software License. In summary, you may copy and distribute this book free of charge or for a profit. No explicit permission is required from the author for reproduction of this book in any medium, physical or electronic. Derivative works and translations of this document must be placed under the Open Software License, and the original copyright notice must remain intact. If you have contributed new material to this book, you must make the material and source code available for your revisions. Please make revisions and updates available directly to the document maintainer, Peter Jay Salzman <[email protected]>. This will allow for the merging of updates and provide consistent revisions to the Linux community. If you publish or distribute this book commercially, donations, royalties, and/or printed copies are greatly appreciated by the author and the Linux Documentation Project (LDP).
    [Show full text]
  • Writing Your First Linux Kernel Module
    Writing your first Linux kernel module Praktikum Kernel Programming University of Hamburg Scientific Computing Winter semester 2014/2015 Outline ● Before you start ● Hello world module ● Compile, load and unload ● User space VS. kernel space programing ● Summary Before you start ● Define your module’s goal ● Define your module behaviour ● Know your hardware specifications ○ If you are building a device driver you should have the manual ● Documentation ○ /usr/src/linux/Documentation ○ make { htmldocs | psdocs | pdfdocks | rtfdocks } ○ /usr/src/linux/Documentation/DocBook Role of the device driver ● Software layer between application and device “black boxes” ○ Offer abstraction ■ Make hardware available to users ○ Hide complexity ■ User does not need to know their implementation ● Provide mechanism not policy ○ Mechanism ■ Providing the flexibility and the ability the device supports ○ Policy ■ Controlling how these capabilities are being used Role of the device driver ● Policy-free characteristics ○ Synchronous and asynchronous operations ○ Exploit the full capabilities of the hardware ○ Often a client library is provided as well ■ Provides capabilities that do not need to be implemented inside the module Outline ● Before you start ● Hello world module ● Compile, load and unload ● User space VS. kernel space programing ● Summary Hello world module /* header files */ #include <linux/module.h> #include <linux/init.h> /* the initialization function */ /* the shutdown function */ static int __init hello_init(void) { static void __exit hello_exit(void)
    [Show full text]
  • Chapter 7 Expressions and Assignment Statements
    Chapter 7 Expressions and Assignment Statements Chapter 7 Topics Introduction Arithmetic Expressions Overloaded Operators Type Conversions Relational and Boolean Expressions Short-Circuit Evaluation Assignment Statements Mixed-Mode Assignment Chapter 7 Expressions and Assignment Statements Introduction Expressions are the fundamental means of specifying computations in a programming language. To understand expression evaluation, need to be familiar with the orders of operator and operand evaluation. Essence of imperative languages is dominant role of assignment statements. Arithmetic Expressions Their evaluation was one of the motivations for the development of the first programming languages. Most of the characteristics of arithmetic expressions in programming languages were inherited from conventions that had evolved in math. Arithmetic expressions consist of operators, operands, parentheses, and function calls. The operators can be unary, or binary. C-based languages include a ternary operator, which has three operands (conditional expression). The purpose of an arithmetic expression is to specify an arithmetic computation. An implementation of such a computation must cause two actions: o Fetching the operands from memory o Executing the arithmetic operations on those operands. Design issues for arithmetic expressions: 1. What are the operator precedence rules? 2. What are the operator associativity rules? 3. What is the order of operand evaluation? 4. Are there restrictions on operand evaluation side effects? 5. Does the language allow user-defined operator overloading? 6. What mode mixing is allowed in expressions? Operator Evaluation Order 1. Precedence The operator precedence rules for expression evaluation define the order in which “adjacent” operators of different precedence levels are evaluated (“adjacent” means they are separated by at most one operand).
    [Show full text]
  • Name Synopsis Description
    Perl version 5.10.0 documentation - vmsish NAME vmsish - Perl pragma to control VMS-specific language features SYNOPSIS use vmsish; use vmsish 'status';# or '$?' use vmsish 'exit'; use vmsish 'time'; use vmsish 'hushed'; no vmsish 'hushed'; vmsish::hushed($hush); use vmsish; no vmsish 'time'; DESCRIPTION If no import list is supplied, all possible VMS-specific features areassumed. Currently, there are four VMS-specific features available:'status' (a.k.a '$?'), 'exit', 'time' and 'hushed'. If you're not running VMS, this module does nothing. vmsish status This makes $? and system return the native VMS exit statusinstead of emulating the POSIX exit status. vmsish exit This makes exit 1 produce a successful exit (with status SS$_NORMAL),instead of emulating UNIX exit(), which considers exit 1 to indicatean error. As with the CRTL's exit() function, exit 0 is also mappedto an exit status of SS$_NORMAL, and any other argument to exit() isused directly as Perl's exit status. vmsish time This makes all times relative to the local time zone, instead of thedefault of Universal Time (a.k.a Greenwich Mean Time, or GMT). vmsish hushed This suppresses printing of VMS status messages to SYS$OUTPUT andSYS$ERROR if Perl terminates with an error status. and allowsprograms that are expecting "unix-style" Perl to avoid having to parseVMS error messages. It does not suppress any messages from Perlitself, just the messages generated by DCL after Perl exits. The DCLsymbol $STATUS will still have the termination status, but with ahigh-order bit set: EXAMPLE:$ perl -e"exit 44;" Non-hushed error exit%SYSTEM-F-ABORT, abort DCL message$ show sym $STATUS$STATUS == "%X0000002C" $ perl -e"use vmsish qw(hushed); exit 44;" Hushed error exit $ show sym $STATUS $STATUS == "%X1000002C" The 'hushed' flag has a global scope during compilation: the exit() ordie() commands that are compiled after 'vmsish hushed' will be hushedwhen they are executed.
    [Show full text]
  • Operators and Expressions
    UNIT – 3 OPERATORS AND EXPRESSIONS Lesson Structure 3.0 Objectives 3.1 Introduction 3.2 Arithmetic Operators 3.3 Relational Operators 3.4 Logical Operators 3.5 Assignment Operators 3.6 Increment and Decrement Operators 3.7 Conditional Operator 3.8 Bitwise Operators 3.9 Special Operators 3.10 Arithmetic Expressions 3.11 Evaluation of Expressions 3.12 Precedence of Arithmetic Operators 3.13 Type Conversions in Expressions 3.14 Operator Precedence and Associability 3.15 Mathematical Functions 3.16 Summary 3.17 Questions 3.18 Suggested Readings 3.0 Objectives After going through this unit you will be able to: Define and use different types of operators in Java programming Understand how to evaluate expressions? Understand the operator precedence and type conversion And write mathematical functions. 3.1 Introduction Java supports a rich set of operators. We have already used several of them, such as =, +, –, and *. An operator is a symbol that tells the computer to perform certain mathematical or logical manipulations. Operators are used in programs to manipulate data and variables. They usually form a part of mathematical or logical expressions. Java operators can be classified into a number of related categories as below: 1. Arithmetic operators 2. Relational operators 1 3. Logical operators 4. Assignment operators 5. Increment and decrement operators 6. Conditional operators 7. Bitwise operators 8. Special operators 3.2 Arithmetic Operators Arithmetic operators are used to construct mathematical expressions as in algebra. Java provides all the basic arithmetic operators. They are listed in Tabled 3.1. The operators +, –, *, and / all works the same way as they do in other languages.
    [Show full text]
  • Open Office Specification 1.0
    Open Office Specification 1.0 Committee Draft 1, 22 Mar 2004 Document identifier: office-spec-1.0-cd-1.sxw Location: http://www.oasis-open.org/committees/office/ Editors: Michael Brauer, Sun Microsystems <[email protected]> Gary Edwards <[email protected]> Daniel Vogelheim, Sun Microsystems <[email protected]> Contributors: Doug Alberg, Boeing <[email protected]> Simon Davis, National Archive of Australia <[email protected]> Patrick Durusau, Society of Biblical Literature <[email protected]> David Faure, <[email protected]> Paul Grosso, Arbortext <[email protected]> Tom Magliery, Blast Radius <[email protected]> Phil Boutros, Stellent <[email protected]> John Chelsom, CSW Informatics <[email protected]> Jason Harrop, SpeedLegal <[email protected]> Mark Heller, New York State Office of the Attorney General <[email protected]> Paul Langille, Corel <[email protected]> Monica Martin, Drake Certivo <[email protected]> Uche Ogbuji <[email protected]> Lauren Wood <[email protected]> Abstract: This is the specification of Open Office XML, an open, XML-based file format for office applications, based on OpenOffice.org XML [OOo]. Status: This document is a draft, and will be updated periodically on no particular schedule. Send comments to the editors. Committee members should send comments on this specification to the [email protected] list. Others should subscribe to and send comments to the [email protected] list. To subscribe, send an email message to office- [email protected] with the word "subscribe" as the body of the message.
    [Show full text]
  • Shell Code for Beginners
    Shell Code For Beginners Beenu Arora Site: www.BeenuArora.com Email: [email protected] ################################################################ # .___ __ _______ .___ # # __| _/____ _______| | __ ____ \ _ \ __| _/____ # # / __ |\__ \\_ __ \ |/ // ___\/ /_\ \ / __ |/ __ \ # # / /_/ | / __ \| | \/ <\ \___\ \_/ \/ /_/ \ ___/ # # \____ |(______/__| |__|_ \\_____>\_____ /\_____|\____\ # # \/ \/ \/ # # ___________ ______ _ __ # # _/ ___\_ __ \_/ __ \ \/ \/ / # # \ \___| | \/\ ___/\ / # # \___ >__| \___ >\/\_/ # # est.2007 \/ \/ forum.darkc0de.com # ################################################################ What is a shell Code? Shellcode is defined as a set of instructions injected and then executed by an exploited program. Shellcode is used to directly manipulate registers and the functionality of a exploited program. We can of course write shell codes in the high level language but would let you know later why they might not work for some cases, so assembly language is preferred for this. I would take an clean example of the exit() syscall used for exiting from a program. Many of you might be wondered to see why this being used is, the reason is the newer kernel don’t allow anymore the code execution from the stack so we have to use some C library wrapper or libc (responsible for providing us the malloc function). Usage at darker site: We write shellcode because we want the target program to function in a manner other than what was intended by the designer. One way to manipulate the program is to force it to make a system call or syscall. System calls in Linux are accomplished via software interrupts and are called with the int 0x80 instruction.
    [Show full text]
  • The Evolution of Lisp
    1 The Evolution of Lisp Guy L. Steele Jr. Richard P. Gabriel Thinking Machines Corporation Lucid, Inc. 245 First Street 707 Laurel Street Cambridge, Massachusetts 02142 Menlo Park, California 94025 Phone: (617) 234-2860 Phone: (415) 329-8400 FAX: (617) 243-4444 FAX: (415) 329-8480 E-mail: [email protected] E-mail: [email protected] Abstract Lisp is the world’s greatest programming language—or so its proponents think. The structure of Lisp makes it easy to extend the language or even to implement entirely new dialects without starting from scratch. Overall, the evolution of Lisp has been guided more by institutional rivalry, one-upsmanship, and the glee born of technical cleverness that is characteristic of the “hacker culture” than by sober assessments of technical requirements. Nevertheless this process has eventually produced both an industrial- strength programming language, messy but powerful, and a technically pure dialect, small but powerful, that is suitable for use by programming-language theoreticians. We pick up where McCarthy’s paper in the first HOPL conference left off. We trace the development chronologically from the era of the PDP-6, through the heyday of Interlisp and MacLisp, past the ascension and decline of special purpose Lisp machines, to the present era of standardization activities. We then examine the technical evolution of a few representative language features, including both some notable successes and some notable failures, that illuminate design issues that distinguish Lisp from other programming languages. We also discuss the use of Lisp as a laboratory for designing other programming languages. We conclude with some reflections on the forces that have driven the evolution of Lisp.
    [Show full text]
  • Guide for the Use of the International System of Units (SI)
    Guide for the Use of the International System of Units (SI) m kg s cd SI mol K A NIST Special Publication 811 2008 Edition Ambler Thompson and Barry N. Taylor NIST Special Publication 811 2008 Edition Guide for the Use of the International System of Units (SI) Ambler Thompson Technology Services and Barry N. Taylor Physics Laboratory National Institute of Standards and Technology Gaithersburg, MD 20899 (Supersedes NIST Special Publication 811, 1995 Edition, April 1995) March 2008 U.S. Department of Commerce Carlos M. Gutierrez, Secretary National Institute of Standards and Technology James M. Turner, Acting Director National Institute of Standards and Technology Special Publication 811, 2008 Edition (Supersedes NIST Special Publication 811, April 1995 Edition) Natl. Inst. Stand. Technol. Spec. Publ. 811, 2008 Ed., 85 pages (March 2008; 2nd printing November 2008) CODEN: NSPUE3 Note on 2nd printing: This 2nd printing dated November 2008 of NIST SP811 corrects a number of minor typographical errors present in the 1st printing dated March 2008. Guide for the Use of the International System of Units (SI) Preface The International System of Units, universally abbreviated SI (from the French Le Système International d’Unités), is the modern metric system of measurement. Long the dominant measurement system used in science, the SI is becoming the dominant measurement system used in international commerce. The Omnibus Trade and Competitiveness Act of August 1988 [Public Law (PL) 100-418] changed the name of the National Bureau of Standards (NBS) to the National Institute of Standards and Technology (NIST) and gave to NIST the added task of helping U.S.
    [Show full text]
  • Multidisciplinary Design Project Engineering Dictionary Version 0.0.2
    Multidisciplinary Design Project Engineering Dictionary Version 0.0.2 February 15, 2006 . DRAFT Cambridge-MIT Institute Multidisciplinary Design Project This Dictionary/Glossary of Engineering terms has been compiled to compliment the work developed as part of the Multi-disciplinary Design Project (MDP), which is a programme to develop teaching material and kits to aid the running of mechtronics projects in Universities and Schools. The project is being carried out with support from the Cambridge-MIT Institute undergraduate teaching programe. For more information about the project please visit the MDP website at http://www-mdp.eng.cam.ac.uk or contact Dr. Peter Long Prof. Alex Slocum Cambridge University Engineering Department Massachusetts Institute of Technology Trumpington Street, 77 Massachusetts Ave. Cambridge. Cambridge MA 02139-4307 CB2 1PZ. USA e-mail: [email protected] e-mail: [email protected] tel: +44 (0) 1223 332779 tel: +1 617 253 0012 For information about the CMI initiative please see Cambridge-MIT Institute website :- http://www.cambridge-mit.org CMI CMI, University of Cambridge Massachusetts Institute of Technology 10 Miller’s Yard, 77 Massachusetts Ave. Mill Lane, Cambridge MA 02139-4307 Cambridge. CB2 1RQ. USA tel: +44 (0) 1223 327207 tel. +1 617 253 7732 fax: +44 (0) 1223 765891 fax. +1 617 258 8539 . DRAFT 2 CMI-MDP Programme 1 Introduction This dictionary/glossary has not been developed as a definative work but as a useful reference book for engi- neering students to search when looking for the meaning of a word/phrase. It has been compiled from a number of existing glossaries together with a number of local additions.
    [Show full text]
  • Concise Introduction to C++
    i i final3 2012/4/19 page 47 i i Chapter 2 Concise Introduction to C++ C++ seems to be most suitable for many practical applications. Indeed, C++ is sufficiently high-level to allow transparent object-oriented programming and efficient use of human resources, yet is also sufficiently low-level to have types, variables, pointers, arrays, and loops to allow efficient use of computer resources. In this chapter, we give a concise description of C++ and illustrate its power as an object-oriented programming language. In particular, we show how to construct and use abstract mathematical objects such as vectors and matrices. We also explain the notion of a template class, which can be filled with a concrete type later on in compilation time. We also discuss inheritance and illustrate its potential. 2.1 Objects As we have seen above, C is a language based on functions. Every command is also a function that returns a value that can be further used or abandoned, according to the wish of the programmer. Furthermore, programmers can write their own functions, which may also return variables of the type specified just before the function name. When the function is called, a temporary, unnamed variable is created to store the returned value until it has been used. C++, on the other hand, is an object-oriented programming language. In this kind of language, the major concern is not the functions that can be executed but rather the objects upon which they operate. Although C++ supports all the operations and features available in C, its point of view is different.
    [Show full text]