Page 2 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Learning Objectives, In this chapter you will learn about:, § Computer languages or programming languages, § Three broad categories of programming languages –, machine, assembly, and high-level languages, § Commonly used programming language tools such as, assembler, compiler, linker, and interpreter, § Concepts of object-oriented programming languages, § Some popular programming languages such as, FORTRAN, COBOL, BASIC, Pascal, C, C++, C#, Java,, RPG, LISP and SNOBOL, § Related concepts such as Subprogram, Characteristics of, a good programming language, and factors to consider, while selecting a language for coding an application, , Ref Page 208, , Chapter 12: Computer Languages, , Slide 2/59
Page 4 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Machine Language, § Only language of a computer understood by it, without using a translation program, § Normally written as strings of binary 1s and 0s, § Written using decimal digits if the circuitry of, the computer being used permits this, , Ref Page 209, , Chapter 12: Computer Languages, , Slide 4/59
Page 5 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , A Typical Machine Language, Instruction Format, OPCODE, (operation code), , OPERAND, (Address/Location), , § OPCODE tells the computer which operation to perform, from the instruction set of the computer, § OPERAND tells the address of the data on which the, operation is to be performed, , Ref Page 210, , Chapter 12: Computer Languages, , Slide 5/59
Page 6 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , A Sample Machine Language Program, 001000000000001100111001, 001100000000010000100001, 011000000000011100101110, 101000111111011100101110, 000000000000000000000000, , 10001471, 14002041, 30003456, 50773456, 00000000, , In Binary, , In Decimal, , (Difficult to read and understand), , Ref Page 210, , (Easier to read and understand), , Chapter 12: Computer Languages, , Slide 6/59
Page 7 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Advantages & Limitations of, Machine Language, Advantage, § Can be executed very fast, Limitations, §, §, §, §, , Ref Page 210, , Machine Dependent, Difficult to program, Error prone, Difficult to modify, , Chapter 12: Computer Languages, , Slide 7/59
Page 8 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Assembly/Symbolic Language, Programming language that overcomes the limitations of machine, language programming by:, §, , Using alphanumeric mnemonic codes instead of numeric codes for, the instructions in the instruction set, e.g. using ADD instead of 1110 (binary) or 14 (decimal) for, instruction to add, , §, , Allowing storage locations to be represented in form of alphanumeric, addresses instead of numeric addresses, e.g. representing memory locations 1000, 1001, and 1002 as FRST,, SCND, and ANSR respectively, , §, , Providing pseudo-instructions that are used for instructing the, system how we want the program to be assembled inside the, computer’s memory, e.g. START PROGRAM AT 0000; SET ASIDE AN ADRESS FOR FRST, , Ref Page 211, , Chapter 12: Computer Languages, , Slide 8/59
Page 9 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Assembler, § Software that translates as assembly language, program into an equivalent machine language program, of a computer, Assembly, language, program, , (Source Program), , Ref Page 212, , Input, , Output, Assembler, , One-to-one correspondence, , Chapter 12: Computer Languages, , Machine, language, program, , (Object Program), , Slide 9/59
Page 10 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , An Example of Assembly, Language Program, , Mnemonic, , Opcode, , HLT, CLA, ADD, SUB, STA, , 00, 10, 14, 15, 30, , Meaning, Halt, used at the end of program to stop, Clear and add into A register, Add to the contents of A register, Subtract from the contents of A register, Store A register, , A subset of the set of instructions supported by a computer, , Ref Page 213, , Chapter 12: Computer Languages, , Slide 10/59
Page 12 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , An Example of Assembly, Language Program, Symbolic name, , Memory location, , FRST, SCND, ANSR, , 1000, 1001, 1002, , Mapping table set up by the assembler for the data items, of the assembly language program, , Ref Page 213, , Chapter 12: Computer Languages, , Slide 12/59
Page 13 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , An Example of Assembly, Language Program, Memory, location, , Contents, Opcode, , Address, , 0000, 0001, , 10, 14, , 1000, 1001, , 0002, 0003, 1000, 1001, 1002, , 30, 00, , 1002, , Comments, , Clear and add the number stored at FRST to A register, Add the number stored at SCND to the contents of A, register, Store the contents of A register into ANSR, Halt, , Reserved for FRST, Reserved for SCND, Reserved for ANSR, , Equivalent machine language program for the assembly language program, , Ref Page 214, , Chapter 12: Computer Languages, , Slide 13/59
Page 14 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Advantages of Assembly Language, Over Machine Language, § Easier to understand and use, § Easier to locate and correct errors, § Easier to modify, § No worry about addresses, § Easily relocatable, § Efficiency of machine language, , Ref Page 214, , Chapter 12: Computer Languages, , Slide 14/59
Page 16 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Typical Uses of Assembly Language, § Mainly used today to fine-tune important parts of, programs written in a high-level language to improve, the program’s execution efficiency, , Ref Page 215, , Chapter 12: Computer Languages, , Slide 16/59
Page 17 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Assembly Languages with, Macro Instructions, , § Any assembly language instruction that gets translated, into several machine language instructions is called a, macro instruction, § Several assembly languages support such macro, instructions to speed up the coding process, § Assemblers of such assembly languages are designed to, produce multiple machine language instructions for each, macro instruction of the assembly language, , Ref Page 215, , Chapter 12: Computer Languages, , Slide 17/59
Page 18 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , High-Level Languages, § Machine independent, § Do not require programmers to know anything about the, internal structure of computer on which high-level, language programs will be executed, § Deal with high-level coding, enabling the programmers, to write instructions using English words and familiar, mathematical symbols and expressions, , Ref Page 216, , Chapter 12: Computer Languages, , Slide 18/59
Page 19 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Compiler, § Translator program (software) that translates a highlevel language program into its equivalent machine, language program, § Compiles a set of machine language instructions for, every program instruction in a high-level language, , Ref Page 217, , Chapter 12: Computer Languages, , Slide 19/59
Page 20 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Compiler, High-level, language, program, , (Source, Program), , Ref Page 217, , Input, , Compiler, , Output, , One-to-many correspondence, , Chapter 12: Computer Languages, , Machine, language, program, , (Object, Program), , Slide 20/59
Page 22 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Compiler, (Continued from previous slide..), , Compiler for, language L1, on computer A, , Machine code for, P1 that will run, on computer A, , Program P1 in highlevel language L1, , Executed on, computer A, , Same results, obtained, , Compiler for, language L1, on computer B, , Machine code for, P1 that will run on, computer B, , Executed on, computer B, , Illustrating the machine independence characteristic of a, high-level language. Separate compilers are required for the, same language on different computers, , Ref Page 218, , Chapter 12: Computer Languages, , Slide 22/59
Page 23 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Syntax Errors, In addition to doing translation job, compilers also, automatically detect and indicate syntax errors, Syntax errors are typically of following types:, § Illegal characters, § Illegal combination of characters, § Improper sequencing of instructions in a program, § Use of undefined variable names, Note : A compiler cannot detect logic errors in a program, , Ref Page 219, , Chapter 12: Computer Languages, , Slide 23/59
Page 24 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , The Process of Removing Syntax Errors, From A Source Program, START, Edit, source program, Source program, Compile, source program, Syntax, errors, detected?, , No, , Generate, object program, Object program, , Yes, Generate list of coded, error messages, , Ref Page 219, , STOP, , Chapter 12: Computer Languages, , Slide 24/59
Page 25 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Linker, § For a large software, storing all the lines of program, code in a single source file will be:, – Difficult to work with, – Difficult to deploy multiple programmers to, concurrently work towards its development, – Any change in the source program would require the, entire source program to be recompiled, § Hence, a modular approach is generally adapted to, develop large software where the software consists of, multiple source program files, § No need to write programs for some modules as it might, be available in library offering the same functionality, (Continued on next slide), , Ref Page 219, , Chapter 12: Computer Languages, , Slide 25/59
Page 26 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Linker, (Continued from previous slide..), , § Each source program file can be independently, modified and compiled to create a corresponding, object program file, § Linker program (software) is used to properly, combine all the object program files (modules), § Creates the final executable program (load module), , Ref Page 220, , Chapter 12: Computer Languages, , Slide 26/59
Page 27 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Interpreter, § Interpreter is a high-level language translator, § Takes one statement of a high-level language, program, translates it into machine language, instructions, § Immediately executes the resulting machine language, instructions, § Compiler simply translates the entire source program, into an object program and is not involved in its, execution, , Ref Page 220, , Chapter 12: Computer Languages, , Slide 27/59
Page 28 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Role of an Interpreter, , High-level language, program, (Source Program), , Ref Page 220, , Input, , Interpreter, (translates and, executes, statement-bystatement), , Output, , Chapter 12: Computer Languages, , Result of, program, execution, , Slide 28/59
Page 29 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Intermediate Language Compiler &, Interpreter, § New type of compiler and interpreter combines the, speed, ease, and control of both compiler and, interpreter, § Compiler first compiles the source program to an, intermediate object program, § Intermediate object program is not a machine, language code but written in an intermediate, language that is virtually machine independent, § Interpreter takes intermediate object program,, converts it into machine language program and, executes it, , Ref Page 221, , Chapter 12: Computer Languages, , Slide 29/59
Page 30 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Benefits of Intermediate Language, Compiler & Interpreter, §, , Intermediate object program is in compiled form and thus is, not original source code, so safer and easier to share, , §, , Intermediate object program is based on a standard, Intermediate Definition Language (IDL), , §, , Interpreter can be written for any computer architecture and, operating system providing virtual machine environment to the, executing program, , §, , Newer Interpreter compiles intermediate program, in memory,, into final host machine language program and executes it, , §, , This technique is called Just-In-Time (JIT) Compilation, , Ref Page 221, , Chapter 12: Computer Languages, , Slide 30/59
Page 31 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Advantages of High-Level Languages, § Machine independent, § Easier to learn and use, § Fewer errors during program development, § Lower program preparation cost, § Better documentation, § Easier to maintain, , Ref Page 222, , Chapter 12: Computer Languages, , Slide 31/59
Page 32 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Limitations of High-Level Languages, § Lower execution efficiency, § Less flexibility to control the computer’s CPU, memory, and registers, , Ref Page 222, , Chapter 12: Computer Languages, , Slide 32/59
Page 33 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Object-Oriented Programming Languages, § Programming languages are used for simulating realworld problems on computers, § Much of the real world is made up of objects, § Essence of OOP is to solve a problem by:, § Identifying the real-world objects of the problem, § Identifying processing required of them, § Creating simulations of objects, processes, and their, communications, , Ref Page 223, , Chapter 12: Computer Languages, , Slide 33/59
Page 34 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , FORTRAN, § Stands for FORmula TRANslation, § Originally developed by John Backus and his team at, IBM followed by several revisions, § Standardized by ANSI as FORTRAN-77 and FORTRAN-90, § Designed for solving scientific & engineering problems, § Oriented towards solving problems of a mathematical, nature, § Popular language amongst scientists and engineers, , Ref Page 223, , Chapter 12: Computer Languages, , Slide 34/59
Page 35 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , A Sample FORTRAN Program, C, C, , FORTRAN PROGRAM TO COMPUTE, THE SUM OF 10 NUMBERS, SUM = 0, DO 50 I = 1, 10, READ (5, 10) N, SUM = SUM + N, 50 CONTINUE, WRITE (6, 20) SUM, 10 FORMAT (F6.2), 20 FORMAT (1X, ’THE SUM OF GIVEN NUMBERS = ’,, F10.2), STOP, END, , Ref Page 224, , Chapter 12: Computer Languages, , Slide 35/59
Page 36 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , COBOL, § Stands for COmmon Business Oriented Language, § Originally developed started under Grace Hopper, followed by COnference on DAta SYstems Languages, (CODASYL), § Standardized by ANSI as COBOL-74, COBOL-85, and, COBOL-2002, § Designed for programming business data processing, applications, § Designed to have the appearance and structure of a, business report written in English, hence often referred, to as a self-documenting language, , Ref Page 224, , Chapter 12: Computer Languages, , Slide 36/59
Page 38 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , A Sample COBOL Program, (Continued from previous slide..), , FD DATA_FILE, RECORD CONTAINS 80 CHARACTERS, LABEL RECORD IS OMITTED, DATA, RECORD, IS, INPUT_DATA_, RECORD., 01, , INPUT_DATA_RECORD., 05 NPICTURE 9(6)V99., 05 FILLER PICTURE X(72)., , FD, , OUTPUT_FILE, RECORD CONTAINS 132 CHARACTERS, LABEL RECORD IS OMITTED, DATA RECORD IS OUTPUT_RECORD., (Continued on next slide), , Ref Page 226, , Chapter 12: Computer Languages, , Slide 38/59
Page 39 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , A Sample COBOL Program, (Continued from previous slide..), , 01, , OUTPUT_RECORD., 05 FILLER PICTURE X., 05TITLE PICTURE X(25)., 05 SUM PICTURE 9(10)V99., 05 FILLER PICTURE X(94)., WORKING_STORAGE SECTION., 77MESSAGE PICTURE X(25), VALUE IS “THE SUM OF GIVEN NUMBERS=”., PROCEDURE DIVISION., OPEN_FILES., OPEN INPUT DATA_FILE., OPEN OUTPUT OUTPUT_FILE., INITIALIZATION., MOVE SPACES TO OUTPUT_RECORD., MOVE ZERO TO SUM., (Continued on next slide), , Ref Page 226, , Chapter 12: Computer Languages, , Slide 39/59
Page 41 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , BASIC, § Stands for Beginners All-purpose Symbolic Instruction, Code, § Developed by Professor John Kemeny and Thomas Kurtz, at Darmouth College in the United States, § Standardized by ANSI as BASIC-78, § Designed to be an interactive language and to use an, interpreter instead of a compiler, § Simple to implement, learn and use language. Hence, it, is a widely used language on personal computers, § Flexible and reasonably powerful language and can be, used for both business and scientific applications, , Ref Page 227, , Chapter 12: Computer Languages, , Slide 41/59
Page 42 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , A Sample BASIC Program, 5, 6, 10, 20, 30, 40, 50, 60, 70, 80, 90, , REM PROGRAM TO COMPUTE, REM THE SUM OF 10 NUMBERS, LET S = 0, FOR I = 1 TO 10, READ N, LET S = S + N, NEXT I, PRINT “THE SUM OF GIVEN NUMBERS = ”; S, DATA 4, 20, 15, 32, 48, DATA 12, 3, 9, 14, 44, END;, , Ref Page 227, , Chapter 12: Computer Languages, , Slide 42/59
Page 43 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Pascal, §, , Named after the famous seventeenth-century French, mathematician Blaise Pascal, , §, , Developed by Professor Nicklaus Wirth of Federal Institute of, Technology in Zurich, , §, , Encourages programmers to write well-structured, modular, programs, instills good program practices, , §, , Recognized as an educational language and is used to teach, programming to beginners, , §, , Suitable for both scientific & business applications, , §, , Has features to manipulate numbers, vectors, matrices,, strings, sets, records, files, and lists, , Ref Page 228, , Chapter 12: Computer Languages, , Slide 43/59
Page 44 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , A Sample Pascal Program, PROGRAM SUMNUMS (INPUT, OUTPUT);, (* PROGRAM TO COMPUTE THE SUM OF 10 NUMBERS *), (* DECLARATION OF VARIABLES *), VAR SUM, N : REAL;, VAR I : INTEGER;, (* MAIN PROGRAM LOGIC STARTS HERE *), BEGIN, SUM := 0;, FOR I := 1 TO 10 DO, BEGIN, READ (N);, SUM := SUM + N;, END;, WRITELN (‘THE SUM OF GIVEN NUMBERS=’, SUM);, END;, , Ref Page 228, , Chapter 12: Computer Languages, , Slide 44/59
Page 45 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , C, § Developed in 1972 at AT&T’s Bell laboratories, USA, by Dennis Ritchie and Brian Kernighan, § Standardized by ANSI and ISO as C89, C90, C99, § High-level programming languages (mainly machine, independence) with the efficiency of an assembly, language, § Language of choice of programmers for portable, systems software and commercial software packages, like OS, compiler, spreadsheet, word processor, and, database management systems, , Ref Page 229, , Chapter 12: Computer Languages, , Slide 45/59
Page 46 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , A Sample C Program, /* PROGRAM TO COMPUTE THE SUM OF 10 NUMBERS */, /* Directives to include standard library and header */, #include <stdlib.h>, #include <stdio.h>, /* Main function starts here */, void main ( ), {, /* Declaration of variables */, float Sum = 0.0, N = 0.0;, int Count = 0;, for (Count = 0; Count < 10; Count++), {, printf(“\nGive a number:”);, scanf(“%f”, N);, Sum += N;, }, printf(“THE SUM OF GIVEN NUMBERS = %f”, &Sum);, }, , Ref Page 230, , Chapter 12: Computer Languages, , Slide 46/59
Page 47 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , C++, § Named C++ as ++ is increment operator and C, language is incremented to its next level with C++, § Developed by Bjarne Stroustrup at Bell Labs in the, early 1980s, § Contains all elements of the basic C language, § Expanded to include numerous object-oriented, programming features, § Provides a collection of predefined classes, along with, the capability of user-defined classes, , Ref Page 229, , Chapter 12: Computer Languages, , Slide 47/59
Page 48 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Java, § Development started at Sun Microsystems in 1991 by a, team led by James Gosling, § Developed to be similar to C++ with fewer features to, keep it simple and easy to use, § Compiled code is machine-independent and developed, programs are simple to implement and use, § Uses just-in-time compilation, § Used in embedded systems such as hand-held devices,, telephones and VCRs, § Comes in two variants – Java Runtime Engine (JRE) and, Java Software Development Kit (SDK), , Ref Page 231, , Chapter 12: Computer Languages, , Slide 48/59
Page 49 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , C# (C Sharp), § Object-oriented programming language developed by, Anders Hejlsberg and released by Microsoft as part of, Microsoft’s .NET technology initiative, § Standardized by ECMA and ISO, § Syntactically and semantically very close to C++ and, adopts various object-oriented features from both C++, and Java, § Compilers target the Common Language Infrastructure, (CLI) implemented by Common Language Runtime (CLR), of .NET Framework, § CLR provides important services such as, memory, management, exception handling, and security, , Ref Page 232, , Chapter 12: Computer Languages, , Slide 49/59
Page 50 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , RPG, § Stands for Report Program Generator, § Developed by IBM to meet customer requests for an, easy and economic mechanism for producing reports, § Designed to generate the output reports resulting from, the processing of common business applications, § Easier to learn and use as compared to COBOL, § Programmers use very detailed coding sheets to write, specifications about input, calculations, and output, , Ref Page 232, , Chapter 12: Computer Languages, , Slide 50/59
Page 51 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , LISP, § Stands for LISt Processing, § Developed in 1959 by John McCarthy of MIT, § Designed to have features for manipulating nonnumeric data, such as symbols and strings of text, § Due to its powerful list processing capability, it is, extensively used in the areas of pattern recognition,, artificial intelligence, and for simulation of games, § Functional programming language in which all, computation is accomplished by applying functions to, arguments, , Ref Page 232, , Chapter 12: Computer Languages, , Slide 51/59
Page 54 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Factors for Selecting a Language for, Coding an Application, § Nature of the application, § Familiarity with the language, § Ease of learning the language, § Availability of program development tools, § Execution efficiency, § Features of a good programming language, , Ref Page 234, , Chapter 12: Computer Languages, , Slide 54/59
Page 55 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Subprogram, § Program written in a manner that it can be brought into, use in other programs and used whenever needed, without rewriting, § Also referred to as subroutine, sub-procedure, or function, § Subprogram call statement contains the name of the, subprogram followed by a list of parameters enclosed, within a pair of parentheses, § Intrinsic subprograms (also called built-in-functions) are, those provided with the programming language, § Programmer-written subprograms are written and used, as and when they are needed, , Ref Page 235, , Chapter 12: Computer Languages, , Slide 55/59
Page 57 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Flow of Control in Case of Subprogram Calls, 2, , subprogram header, 3, subprogram body, , 6, , 1, 4, , subprogram call statement, next statement, , 7, 5, subprogram call statement, 8, 9, , A subprogram, , Ref Page 236, , Flow of control, , next statement, , A program that calls, the subprogram twice, , Chapter 12: Computer Languages, , Slide 57/59
Page 58 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Key Words/Phrases, §, §, §, §, §, §, §, §, §, §, §, §, §, §, §, §, §, §, , Assembler, Assembly language, BASIC, Built-in function, C, C++, C#, COBOL, Coding, Compiler, Computer language, FORTRAN, Function, High-level language, HotJava Interpreter, Intrinsic subprogram, Intermediate compiler and, Interpreter, Java, , §, §, §, §, §, §, §, §, §, §, §, §, §, §, §, §, §, §, §, §, , Just-in-time compilation, Language processor, Linker, LISP, Load module, Logic error, Low-level language, Machine language, Macro instructions, Object program, Object-oriented programming, Opcode, Operand, Pascal, Programmer, Programming, Programming language, Pseudo instruction, RPG, Self-documenting language, (Continued on next slide), , Ref Page 236, , Chapter 12: Computer Languages, , Slide 58/59
Page 59 :
Computer, Computer Fundamentals:, Fundamentals: Pradeep, Pradeep K., K. Sinha, Sinha &, & Priti, Priti Sinha, Sinha, , Key Words/Phrases, (Continued from previous slide..), , §, §, §, §, §, §, §, §, §, , SNOBOL, Source program, Sub-procedure, Subprogram, Subroutine, Symbolic language, Syntax error, Syntax rules, Written subprograms, , Ref Page 236, , Chapter 12: Computer Languages, , Slide 59/59