Home Random Page


CATEGORIES:

BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism






High-Level Languages

High-level languages were developed because of the difficulty of programming using assembly languages. High-level languages are easier to use than machine and assembly languages because their commands are closer to natural human language. In addition, these languages are not CPU-specific. Instead, they contain general commands that work on different CPUs. For example, a programmer writing in the high-level C++ programming language who wants to display a greeting need include only the following command:

cout << ‘Hello, Encarta User!’ << endl;

This command directs the computer’s CPU to display the greeting, and it will work no matter what type of CPU the computer uses. When this statement is executed, the text that appears between the quotes will be displayed. Although the “cout” and “endl” parts of the above statement appear cryptic, programmers quickly become accustomed to their meanings. For example, “cout” sends the greeting message to the “standard output” (usually the computer user’s screen) and “endl” is how to tell the computer (when using the C++ language) to go to a new line after it outputs the message. Like assembly-language instructions, high-level languages also must be translated. This is the task of a special program called a compiler. A compiler turns a high-level program into a CPU-specific machine language. For example, a programmer may write a program in a high-level language such as C++ or Java and then prepare it for different machines, such as a Sun Microsystems work station or a personal computer (PC), using compilers designed for those machines. This simplifies the programmer’s task and makes the software more portable to different users and machines.

Flow-Matic

American naval officer and mathematician Grace Murray Hopper helped develop the first commercially available high-level software language, FLOW-MATIC, in 1957. Hopper is credited for inventing the term bug, which indicates a computer malfunction; in 1945 she discovered a hardware failure in the Mark II computer caused by a moth trapped between its mechanical relays. She documented the event in her laboratory notebook, and the term eventually came to represent any computer error, including one based strictly on incorrect instructions in software. Hopper taped the moth into her notebook and wrote, “First actual case of a bug being found.”

Fortran

From 1954 to 1958 American computer scientist John Backus of International Business Machines, Inc. (IBM) developed Fortran, an acronym for Formula Translation. It became a standard programming language because it could process mathematical formulas. Fortran and its variations are still in use today, especially in physics.

Basic

Hungarian-American mathematician John Kemeny and American mathematician Thomas Kurtz at Dartmouth College in Hanover, New Hampshire, developed BASIC (Beginner’s All-purpose Symbolic Instruction Code) in 1964. The language was easier to learn than its predecessors and became popular due to its friendly, interactive nature and its inclusion on early personal computers. Unlike languages that require all their instructions to be translated into machine code first, BASIC is turned into machine language line by line as the program runs. BASIC commands typify high-level languages because of their simplicity and their closeness to natural human language. For example, a program that divides a number in half can be written as



10 INPUT “ENTER A NUMBER,” X

20 Y=X/2

30 PRINT “HALF OF THAT NUMBER IS,” Y

The numbers that precede each line are chosen by the programmer to indicate the sequence of the commands. The first line prints “ENTER A NUMBER” on the computer screen followed by a question mark to prompt the user to type in the number labeled “X.” In the next line, that number is divided by two and stored as “Y.” In the third line, the result of the operation is displayed on the computer screen. Even though BASIC is almost never used any more, this simple program demonstrates how data are stored and manipulated in most high-level programming languages.

Other High-Level Languages

Other high-level languages in use today include C, C++, Ada, Pascal, LISP, Prolog, COBOL, Visual Basic, and Java. Somelanguages, such as the “markup languages” known as HTML, XML, and their variants, are intended to display data, graphics, and media selections, especially for users of the World Wide Web. Markup languages are often not considered programming languages, but they have become increasingly sophisticated.


Date: 2015-12-18; view: 981


<== previous page | next page ==>
The Central Processing Unit | Range of Computer Ability
doclecture.net - lectures - 2014-2024 year. Copyright infringement or personal data (0.006 sec.)