Structured programming language

20 211 0
Structured programming language

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Structured Programming Language ITSS113 Lecture-1 : INTRODUCTION • To provide brief history of COBOL • To learn the capabilities and limitations of COBOL • To present the program layout of COBOL • To discuss the structure of a COBOL program • To determine the difference between COBOL Literal Set, COBOL Words, COBOL Literals Learning Objectives: Introduction to COBOL • COBOL – Common Business Oriented Language – A third-generation programming language, – Was one of the earliest high-level programming languages; still widely used today. – First proposed in 1959 by the Conference on Data Systems Languages (CODASYL). – Three ANSI standards for COBOL have been produced in 1968, 1974 and 1985. – Object-oriented COBOL is the fourth edition in the continuing evolution of ANSI/ISO standard COBOL. Underlining Philosophy • Like the name suggests, COBOL was meant to be ‘common’ or compatible among a significant group of manufacturers • COBOL is designed for developing business, typically file- oriented, applications, and is not designed for writing systems programs. • Primary domain in business, finance, and administrative systems for companies and governments. Pro’s and Con’s - Disadvantages - very wordy - has a very rigid format - not designed to handle scienc applicaons - Advantages - Simple - Portable - Maintainable Distinct features • The language is simple • No pointers • No user defined types • No user defined functions • ‘Structure like’ data types • File records are also described with great detail, as are lines to be output to a printer • COBOL is self documenting COBOL PROGRAM LAYOUT The layout, or format, or a COBOL program follows certain simple rules, which originated long ago when programs were punched onto 80-column punch cards. COBOL programs are written in coding sheets. There are 80 columns in a line of the coding sheet. COBOL PROGRAM LAYOUT (CONTINUED) Column Field 1-3 Page Number 4-6 Line Number (1-6 Sequence Number) 7 Continuation / Comment 8-11 A – Margin / Area A 12-72 B- Margin /Area B 73-80 Identification Structure of COBOL Program • COBOL programs are hierarchical in structure. – Each element of the hierarchy consists of one or more subordinate elements. • The levels of hierarchy are Divisions, Sections, Paragraphs, Sentences and Statements • There are 4 main divisions and each division provides an essential part of the information required by the complier Structure of COBOL Program (continued) • At the top of the COBOL hierarchy are the four divisions. • The sequence in which they are specified is fixed, and must follow the order: – IDENTIFICATION DIVISION. This division’s primary purpose is to name the program – ENVIRONMENT DIVISION. This division is primarily used to tell the computer about the input and output devices such files or printers. – DATA DIVISION provides descriptions of the data-items/fields processed by the program. – PROCEDURE DIVISION contains the code used to manipulate the data described in the DATA DIVISION. It is here that the programmer describes his algorithm. Note: Some COBOL compilers require that all the divisions be present in a program while others only require the IDENTIFICATION DIVISION and the PROCEDURE DIVISION . to COBOL • COBOL – Common Business Oriented Language – A third-generation programming language, – Was one of the earliest high-level programming languages; still widely used today. – First. Structured Programming Language ITSS113 Lecture-1 : INTRODUCTION • To provide brief history of COBOL • To learn. languages; still widely used today. – First proposed in 1959 by the Conference on Data Systems Languages (CODASYL). – Three ANSI standards for COBOL have been produced in 1968, 1974 and 1985.

Ngày đăng: 23/10/2014, 20:10

Từ khóa liên quan

Mục lục

  • Slide 1

  • Lecture-1 : INTRODUCTION

  • Introduction to COBOL

  • Underlining Philosophy

  • Pro’s and Con’s

  • Distinct features

  • COBOL program layout

  • COBOL program layout (continued)

  • Structure of COBOL Program

  • Structure of COBOL Program (continued)

  • Hello World Example

  • Character Set

  • Character Set (continued)

  • COBOL WORDS

  • COBOL WORDS (continued)

  • Slide 16

  • Literals

  • Literals (continued)

  • Slide 19

  • Slide 20

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan