Enterprise PL/I for Z/OS Programming Guide Specifying Options in the EXEC Statement Using Using Built-In Functions Under LP(64)

Total Page:16

File Type:pdf, Size:1020Kb

Enterprise PL/I for Z/OS Programming Guide Specifying Options in the EXEC Statement Using Using Built-In Functions Under LP(64) Enterprise PL/I for z/OS IBM Programming Guide Version 5 Release 1 GI13-4536-00 Enterprise PL/I for z/OS IBM Programming Guide Version 5 Release 1 GI13-4536-00 Note Before using this information and the product it supports, be sure to read the general information under “Notices” on page 521. First Edition (August 2017) This edition applies to Version 5 Release 1 of Enterprise PL/I for z/OS and to any subsequent releases until otherwise indicated in new editions or technical newsletters. Make sure you are using the correct edition for the level of the product. Order publications through your IBM representative or the IBM branch office serving your locality. Publications are not stocked at the address below. A form for readers' comments is provided at the back of this publication. If the form has been removed, address your comments to: IBM Corporation, Department H150/090 555 Bailey Ave San Jose, CA, 95141-1099 United States of America When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. © Copyright IBM Corporation 1999, 2017. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Tables ............... ix COPYRIGHT ............. 17 CSECT ............... 18 Figures ............... xi CSECTCUT ............. 18 CURRENCY ............. 19 DBCS ............... 19 Introduction ............ xiii DD ................ 19 About this document ........... xiii DDSQL............... 20 Runtime environment for Enterprise PL/I for z/OS xiii DECIMAL .............. 20 Using your documentation ......... xiii DECOMP .............. 22 Notation conventions used in this document ... xiv DEFAULT .............. 22 Conventions used ........... xiv DEPRECATE ............. 31 How to read the syntax notation ...... xv DEPRECATENEXT ........... 32 How to read the notational symbols .... xvii DISPLAY .............. 33 Summary of changes .......... xviii DLLINIT .............. 33 Enhancements in this release ....... xviii EXIT................ 33 Enhancements from V4R5 ........ xxi EXPORTALL ............. 34 Enhancements from V4R4 ........ xxii EXTRN ............... 34 Enhancements from V4R3 ........ xxiii FILEREF .............. 34 Enhancements from V4R2 ........ xxiv FLAG ............... 34 Enhancements from V4R1 ........ xxv FLOAT ............... 35 Enhancements from V3R9 ........ xxvi FLOATINMATH............ 36 Enhancements from V3R8 ....... xxviii GOFF ............... 37 Enhancements from V3R7 ........ xxix GONUMBER ............. 38 Enhancements from V3R6 ........ xxx GRAPHIC .............. 38 Enhancements from V3R5 ........ xxxi HEADER .............. 39 Enhancements from V3R4........ xxxii IGNORE .............. 39 Enhancements from V3R3 ....... xxxiv INCAFTER ............. 39 Enhancements from V3R2 ........ xxxv INCDIR .............. 40 Enhancements from V3R1 ....... xxxvi INCLUDE .............. 40 Enhancements from VisualAge PL/I .... xxxvii INCPDS .............. 41 How to send your comments ....... xxxviii INITAUTO ............. 41 Accessibility............. xxxviii INITBASED ............. 42 INITCTL .............. 42 Part 1. Compiling your program ... 1 INITSTATIC ............. 43 INSOURCE ............. 43 Chapter 1. Using compiler options and INTERRUPT ............. 44 JSON ............... 44 facilities............... 3 LANGLVL.............. 45 Compile-time option descriptions ....... 3 LIMITS ............... 45 AGGREGATE ............. 7 LINECOUNT ............. 47 ARCH ............... 8 LINEDIR .............. 47 | ASSERT ............... 9 LIST ................ 47 ATTRIBUTES ............. 9 LISTVIEW .............. 47 BACKREG.............. 10 LP ................ 49 BIFPREC .............. 10 MACRO .............. 49 BLANK............... 11 MAP ............... 50 BLKOFF .............. 12 MARGINI .............. 50 BRACKETS ............. 12 MARGINS.............. 50 | CASE ............... 12 MAXBRANCH ............ 51 CASERULES ............. 13 MAXGEN .............. 52 CEESTART ............. 13 MAXMEM.............. 52 CHECK .............. 14 MAXMSG .............. 53 CMPAT............... 15 MAXNEST ............. 53 CODEPAGE ............. 16 MAXSTMT ............. 54 COMMON ............. 16 MAXTEMP ............. 54 COMPILE .............. 17 MDECK .............. 54 © Copyright IBM Corp. 1999, 2017 iii MSGSUMMARY............ 55 Using the compiler listing ......... 103 NAME ............... 55 Heading information .......... 103 NAMES .............. 56 Options used for compilation ....... 104 NATLANG ............. 56 Preprocessor input .......... 104 NEST ............... 56 SOURCE program ........... 104 NOT................ 56 Statement nesting level ......... 105 NULLDATE ............. 57 ATTRIBUTE and cross-reference table .... 105 NUMBER .............. 57 Aggregate length table ......... 106 OBJECT .............. 58 Statement offset addresses ........ 106 OFFSET .............. 58 Storage offset listing .......... 109 OFFSETSIZE ............. 58 Expressions and attributes listing ...... 110 ONSNAP .............. 59 File reference table........... 110 OPTIMIZE.............. 59 Messages and return codes ........ 111 OPTIONS .............. 60 Example .............. 112 OR ................ 61 PP ................ 61 Chapter 2. PL/I preprocessors .... 117 PPCICS............... 62 Include preprocessor ........... 117 PPINCLUDE ............. 63 Macro preprocessor ........... 118 PPLIST ............... 63 Macro preprocessor options ....... 118 PPMACRO ............. 64 Macro preprocessor example ....... 121 PPSQL ............... 64 SQL preprocessor ............ 122 PPTRACE .............. 65 Programming and compilation considerations 123 PRECTYPE ............. 65 SQL preprocessor options ........ 125 PREFIX ............... 65 Coding SQL statements in PL/I applications 129 PROCEED .............. 66 Manipulating LOB data ......... 140 PROCESS .............. 66 Suppressing SQL preprocessor messages ... 143 QUOTE............... 67 CICS preprocessor............ 144 REDUCE .............. 67 Programming and compilation considerations 144 RENT ............... 68 CICS preprocessor options ........ 145 RESEXP .............. 69 Coding CICS statements in PL/I applications 145 RESPECT .............. 70 Writing CICS transactions in PL/I ..... 146 RTCHECK.............. 70 Error-handling ............ 146 RULES ............... 70 SEMANTIC ............. 83 Chapter 3. Using PL/I cataloged SERVICE .............. 84 SOURCE .............. 84 procedures ............ 147 SPILL ............... 85 IBM-supplied cataloged procedures ...... 147 STATIC ............... 85 Compile only (IBMZC) ......... 148 STDSYS .............. 85 Compile and bind (IBMZCB) ....... 149 STMT ............... 86 Compile, bind, and run (IBMZCBG) ..... 151 STORAGE .............. 86 Invoking a cataloged procedure ....... 153 STRINGOFGRAPHIC .......... 86 Specifying multiple cataloged procedure SYNTAX .............. 87 invocations .............. 153 SYSPARM .............. 87 Modifying the PL/I cataloged procedures .... 154 SYSTEM .............. 88 EXEC statement ........... 154 TERMINAL ............. 89 DD statement ............ 155 TEST ............... 89 UNROLL .............. 92 Chapter 4. Compiling your program 157 USAGE............... 92 Invoking the compiler under z/OS UNIX .... 157 WIDECHAR ............. 93 Input files ............. 157 WINDOW .............. 94 Specifying compile-time options under z/OS WRITABLE ............. 94 UNIX ............... 158 XINFO ............... 95 -qoption_keyword ........... 158 XML................ 98 Single and multiletter flags ........ 159 XREF ............... 98 Invoking the compiler under z/OS using JCL .. 159 Blanks, comments and strings in options .... 99 EXEC statement ........... 160 Changing the default options ........ 99 DD statements for the standard data sets ... 160 Specifying options in the %PROCESS or *PROCESS Listing (SYSPRINT) .......... 162 statements .............. 100 Source Statement Library (SYSLIB) ..... 162 Using % statements ........... 101 Specifying options........... 163 Using the %INCLUDE statement ....... 101 Specifying options in the EXEC statement ... 163 iv Enterprise PL/I for z/OS Programming Guide Specifying options in the EXEC statement using Using built-in functions under LP(64) ..... 193 an options file ............ 164 Considerations for SQL programs ...... 194 Communicating with 31-bit routines...... 196 Chapter 5. Link-editing and running for 31-bit programs ......... 165 Part 2. Using I/O facilities ..... 199 Link-edit considerations for 31-bit programs ... 165 Using the binder in 31-bit programs ..... 165 Chapter 8. Using data sets and files 201 Using the ENTRY card ......... 165 Allocating files ............. 201 Runtime considerations for 31-bit programs ... 165 Associating data sets with files under z/OS ... 203 Formatting conventions for PRINT files ... 166 Associating several files with one data set ... 205 Changing the format on PRINT files for 31-bit Associating several data sets with one file ... 205 programs .............. 166 Concatenating several data sets ...... 206 Automatic prompting ......... 167 Accessing HFS files under z/OS ...... 206 Overriding automatic prompting ...... 168 Associating data sets with files under z/OS UNIX 207 Punctuating long input lines ....... 168 Using environment variables ....... 207 Punctuating GET LIST and GET DATA Using the TITLE option of the OPEN statement 208 statements ............. 169 Attempting
Recommended publications
  • Chapter 1 Introduction to Computers, Programs, and Java
    Chapter 1 Introduction to Computers, Programs, and Java 1.1 Introduction • The central theme of this book is to learn how to solve problems by writing a program . • This book teaches you how to create programs by using the Java programming languages . • Java is the Internet program language • Why Java? The answer is that Java enables user to deploy applications on the Internet for servers , desktop computers , and small hand-held devices . 1.2 What is a Computer? • A computer is an electronic device that stores and processes data. • A computer includes both hardware and software. o Hardware is the physical aspect of the computer that can be seen. o Software is the invisible instructions that control the hardware and make it work. • Computer programming consists of writing instructions for computers to perform. • A computer consists of the following hardware components o CPU (Central Processing Unit) o Memory (Main memory) o Storage Devices (hard disk, floppy disk, CDs) o Input/Output devices (monitor, printer, keyboard, mouse) o Communication devices (Modem, NIC (Network Interface Card)). Bus Storage Communication Input Output Memory CPU Devices Devices Devices Devices e.g., Disk, CD, e.g., Modem, e.g., Keyboard, e.g., Monitor, and Tape and NIC Mouse Printer FIGURE 1.1 A computer consists of a CPU, memory, Hard disk, floppy disk, monitor, printer, and communication devices. CMPS161 Class Notes (Chap 01) Page 1 / 15 Kuo-pao Yang 1.2.1 Central Processing Unit (CPU) • The central processing unit (CPU) is the brain of a computer. • It retrieves instructions from memory and executes them.
    [Show full text]
  • Using Functions
    TIBCO WebFOCUS® Using Functions Release 8207 May 2021 DN4501670.0521 Copyright © 2021. TIBCO Software Inc. All Rights Reserved. Contents 1. How to Use This Manual ...................................................... 17 Available Languages .................................................................17 Operating Systems .................................................................. 17 2. Introducing Functions .........................................................19 Using Functions .....................................................................19 Types of Functions ...................................................................20 WebFOCUS-specific Functions.................................................... 22 Simplified Analytic Functions..................................................... 22 Simplified Character Functions....................................................23 Character Functions.............................................................25 Variable Length Character Functions...............................................28 Character Functions for DBCS Code Pages......................................... 29 Maintain-specific Character Functions..............................................30 Data Source and Decoding Functions..............................................31 Simplified Date and Date-Time Functions...........................................33 Date Functions................................................................. 33 Standard Date Functions..................................................
    [Show full text]
  • Language Translators
    Student Notes Theory LANGUAGE TRANSLATORS A. HIGH AND LOW LEVEL LANGUAGES Programming languages Low – Level Languages High-Level Languages Example: Assembly Language Example: Pascal, Basic, Java Characteristics of LOW Level Languages: They are machine oriented : an assembly language program written for one machine will not work on any other type of machine unless they happen to use the same processor chip. Each assembly language statement generally translates into one machine code instruction, therefore the program becomes long and time-consuming to create. Example: 10100101 01110001 LDA &71 01101001 00000001 ADD #&01 10000101 01110001 STA &71 Characteristics of HIGH Level Languages: They are not machine oriented: in theory they are portable , meaning that a program written for one machine will run on any other machine for which the appropriate compiler or interpreter is available. They are problem oriented: most high level languages have structures and facilities appropriate to a particular use or type of problem. For example, FORTRAN was developed for use in solving mathematical problems. Some languages, such as PASCAL were developed as general-purpose languages. Statements in high-level languages usually resemble English sentences or mathematical expressions and these languages tend to be easier to learn and understand than assembly language. Each statement in a high level language will be translated into several machine code instructions. Example: number:= number + 1; 10100101 01110001 01101001 00000001 10000101 01110001 B. GENERATIONS OF PROGRAMMING LANGUAGES 4th generation 4GLs 3rd generation High Level Languages 2nd generation Low-level Languages 1st generation Machine Code Page 1 of 5 K Aquilina Student Notes Theory 1. MACHINE LANGUAGE – 1ST GENERATION In the early days of computer programming all programs had to be written in machine code.
    [Show full text]
  • IBM Data Conversion Under Websphere MQ
    IBM WebSphere MQ Data Conversion Under WebSphere MQ Table of Contents .................................................................................................................................................... 3 .................................................................................................................................................... 3 Int roduction............................................................................................................................... 4 Ac ronyms and terms used in Data Conversion........................................................................ 5 T he Pieces in the Data Conversion Puzzle............................................................................... 7 Coded Character Set Identifier (CCSID)........................................................................................ 7 Encoding .............................................................................................................................................. 7 What Gets Converted, and How............................................................................................... 9 The Message Descriptor.................................................................................................................... 9 The User portion of the message..................................................................................................... 10 Common Procedures when doing the MQPUT................................................................. 10 The message
    [Show full text]
  • JFP Reference Manual 5 : Standards, Environments, and Macros
    JFP Reference Manual 5 : Standards, Environments, and Macros Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A. Part No: 817–0648–10 December 2002 Copyright 2002 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. All rights reserved. This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Third-party software, including font technology, is copyrighted and licensed from Sun suppliers. Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. Sun, Sun Microsystems, the Sun logo, docs.sun.com, AnswerBook, AnswerBook2, and Solaris are trademarks, registered trademarks, or service marks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. The OPEN LOOK and Sun™ Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun’s licensees who implement OPEN LOOK GUIs and otherwise comply with Sun’s written license agreements.
    [Show full text]
  • Complete Code Generation from UML State Machine
    Complete Code Generation from UML State Machine Van Cam Pham, Ansgar Radermacher, Sebastien´ Gerard´ and Shuai Li CEA, LIST, Laboratory of Model Driven Engineering for Embedded Systems, P.C. 174, Gif-sur-Yvette, 91191, France Keywords: UML State Machine, Code Generation, Semantics-conformance, Efficiency, Events, C++. Abstract: An event-driven architecture is a useful way to design and implement complex systems. The UML State Machine and its visualizations are a powerful means to the modeling of the logical behavior of such an archi- tecture. In Model Driven Engineering, executable code can be automatically generated from state machines. However, existing generation approaches and tools from UML State Machines are still limited to simple cases, especially when considering concurrency and pseudo states such as history, junction, and event types. This paper provides a pattern and tool for complete and efficient code generation approach from UML State Ma- chine. It extends IF-ELSE-SWITCH constructions of programming languages with concurrency support. The code generated with our approach has been executed with a set of state-machine examples that are part of a test-suite described in the recent OMG standard Precise Semantics Of State Machine. The traced execution results comply with the standard and are a good hint that the execution is semantically correct. The generated code is also efficient: it supports multi-thread-based concurrency, and the (static and dynamic) efficiency of generated code is improved compared to considered approaches. 1 INTRODUCTION Completeness: Existing tools and approaches mainly focus on the sequential aspect while the concurrency The UML State Machine (USM) (Specification and of state machines is limitedly supported.
    [Show full text]
  • Chapter 1 Introduction to Computers, Programs, and Java
    Chapter 1 Introduction to Computers, Programs, and Java 1.1 Introduction • Java is the Internet program language • Why Java? The answer is that Java enables user to deploy applications on the Internet for servers, desktop computers, and small hand-held devices. 1.2 What is a Computer? • A computer is an electronic device that stores and processes data. • A computer includes both hardware and software. o Hardware is the physical aspect of the computer that can be seen. o Software is the invisible instructions that control the hardware and make it work. • Programming consists of writing instructions for computers to perform. • A computer consists of the following hardware components o CPU (Central Processing Unit) o Memory (Main memory) o Storage Devices (hard disk, floppy disk, CDs) o Input/Output devices (monitor, printer, keyboard, mouse) o Communication devices (Modem, NIC (Network Interface Card)). Memory Disk, CD, and Storage Input Keyboard, Tape Devices Devices Mouse CPU Modem, and Communication Output Monitor, NIC Devices Devices Printer FIGURE 1.1 A computer consists of a CPU, memory, Hard disk, floppy disk, monitor, printer, and communication devices. 1.2.1 Central Processing Unit (CPU) • The central processing unit (CPU) is the brain of a computer. • It retrieves instructions from memory and executes them. • The CPU usually has two components: a control Unit and Arithmetic/Logic Unit. • The control unit coordinates the actions of the other components. • The ALU unit performs numeric operations (+ - / *) and logical operations (comparison). • The CPU speed is measured by clock speed in megahertz (MHz), with 1 megahertz equaling 1 million pulses per second.
    [Show full text]
  • Notetab User Manual
    NoteTab User Manual Copyright © 1995-2016, FOOKES Holding Ltd, Switzerland NoteTab® Tame Your Text with NoteTab by FOOKES Holding Ltd A leading-edge text and HTML editor. Handle a stack of huge files with ease, format text, use a spell-checker, and perform system-wide searches and multi-line global replacements. Build document templates, convert text to HTML on the fly, and take charge of your code with a bunch of handy HTML tools. Use a power-packed scripting language to create anything from a text macro to a mini-application. Winner of top industry awards since 1998. “NoteTab” and “Fookes” are registered trademarks of Fookes Holding Ltd. All other trademarks and service marks, both marked and not marked, are the property of their respective ow ners. NoteTab® Copyright © 1995-2016, FOOKES Holding Ltd, Switzerland All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the written permission of the publisher. “NoteTab” and “Fookes” are registered trademarks of Fookes Holding Ltd. All other trademarks and service marks, both marked and not marked, are the property of their respective owners. While every precaution has been taken in the preparation of this document, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document.
    [Show full text]
  • What Is a Computer Program? 1 High-Level Vs Low-Level Languages
    What Is A Computer Program? Scientific Computing Fall, 2019 Paul Gribble 1 High-level vs low-level languages1 2 Interpreted vs compiled languages3 What is a computer program? What is code? What is a computer language? A computer program is simply a series of instructions that the computer executes, one after the other. An instruction is a single command. A program is a series of instructions. Code is another way of referring to a single instruction or a series of instructions (a program). 1 High-level vs low-level languages The CPU (central processing unit) chip(s) that sit on the motherboard of your computer is the piece of hardware that actually executes instructions. A CPU only understands a relatively low-level language called machine code. Often machine code is generated automatically by translating code written in assembly language, which is a low-level programming language that has a relatively direcy relationship to machine code (but is more readable by a human). A utility program called an assembler is what translates assembly language code into machine code. In this course we will be learning how to program in MATLAB, which is a high-level programming language. The “high-level” refers to the fact that the language has a strong abstraction from the details of the computer (the details of the machine code). A “strong abstraction” means that one can operate using high-level instructions without having to worry about the low-level details of carrying out those instructions. An analogy is motor skill learning. A high-level language for human action might be drive your car to the grocery store and buy apples.
    [Show full text]
  • M-Command Manual NYSOL Package Current Release: Ver
    M-Command Manual NYSOL Package Current Release: Ver. 2.0 Releases: October 6, 2014: Ver. 2.0 Release April 30, 2014 : Updated errors in examples March 10, 2014 : Changes in installation method corresponding to integration of NYSOL package February 15, 2014 : Added mxml2csv November 2, 2013 : Added mpadding, mvnullto, mvdelnull, and minor changes September 20, 2013 : First Release March 24, 2015 Copyright ⃝c 2013-2014 by NYSOL CORPORATION Contents 1 Changes from Package 1.0 7 1.1 Addition of Automatic Sorting Function ................................ 8 1.2 Commands with Change in Specifications ............................... 8 1.3 Executing Previous Scripts ....................................... 9 2 M-Command 11 2.1 M-Command ............................................... 12 2.2 Let's start ................................................. 12 2.3 Installation ................................................ 14 2.4 CSV .................................................... 15 2.5 Data Type ................................................. 18 2.6 Specify Fields ............................................... 19 2.7 Working with Data Without Field Names ............................... 24 2.8 Multibyte Characters ........................................... 25 2.9 Specify Parameters ............................................ 27 2.10 Environment Variable .......................................... 39 2.11 Key Break Processing .......................................... 41 3 Command Reference 43 3.1 Format of MCMD ...........................................
    [Show full text]
  • IBM Enhanced 5250 Emulation Program User's Guide Version 2.4 Publication No
    G570-2221-05 IBM Enhanced 5250 Emulation Program User's Guide Version 2.4 GS70-2221-0S IBM Enhanced 5250 Emulation Program User's Guide Version 2.4 Note! ------------------~--------------------------------. Before using this information and the product it supports, be sure to read the general information under "Notices" on page xv. Sixth Edition (April 1994) This edition applies to the IBM Enhanced 5250 Emulation Program Version 2.4 and to all subsequent releases and modifications until otherwise indicated in new editions. The following paragraph does not apply to the United Kingdom or any country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This publication could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. Products are not stocked at the address below. Additional copies of this publication may be purchased from an IBM Authorized Dealer, IBM PC Direct™ (1-800-IBM-2YOU), IBM AS/400® Direct (1-800-IBM-CALL), or the IBM Software Manufacturing Company (1-800-879-2755). When calling, reference Order Number G570-2221 and Part Number 82G7303. Requests for technical information about these products should be made to your IBM Authorized Dealer or your IBM Marketing Representative.
    [Show full text]
  • Chapter 1 Basic Principles of Programming Languages
    Chapter 1 Basic Principles of Programming Languages Although there exist many programming languages, the differences among them are insignificant compared to the differences among natural languages. In this chapter, we discuss the common aspects shared among different programming languages. These aspects include: programming paradigms that define how computation is expressed; the main features of programming languages and their impact on the performance of programs written in the languages; a brief review of the history and development of programming languages; the lexical, syntactic, and semantic structures of programming languages, data and data types, program processing and preprocessing, and the life cycles of program development. At the end of the chapter, you should have learned: what programming paradigms are; an overview of different programming languages and the background knowledge of these languages; the structures of programming languages and how programming languages are defined at the syntactic level; data types, strong versus weak checking; the relationship between language features and their performances; the processing and preprocessing of programming languages, compilation versus interpretation, and different execution models of macros, procedures, and inline procedures; the steps used for program development: requirement, specification, design, implementation, testing, and the correctness proof of programs. The chapter is organized as follows. Section 1.1 introduces the programming paradigms, performance, features, and the development of programming languages. Section 1.2 outlines the structures and design issues of programming languages. Section 1.3 discusses the typing systems, including types of variables, type equivalence, type conversion, and type checking during the compilation. Section 1.4 presents the preprocessing and processing of programming languages, including macro processing, interpretation, and compilation.
    [Show full text]