Computer Programming

Given what has been said about interpretive interfaces, there are some commonalities among almost all procedural languages. All general computer Central Processing Units (CPU)s support a set of operators that perform logical or arithmetic operations in binary or binary coded decimal. This allows the coding of methods. A method is a process that you can see.

Control

High level languages provide a short list of control constructs which direct the flow of processing. These constructs allow various conditions to change the flow of a program to choose one set of instructions over another.


Control constructs fall into the categories of branching and looping.

The Central Processing Unit (CPU) instruction set supports a jump and a call operation. Low level languages have the basic branch called "jump" or "goto" as well as the call. High level languages often omit the "goto"as they lead to spaghetti code. The jump instruction is hidden by exception mechanisms. A call statement supports the notion of a mechanism. A mechanism is a procedure that you cannot see. It is implemented in the interpretive interface. Most high level languages have variations of the branching constructs IF/THEN/ELSE and CASE/OF. These are really constrained uses of the jump operation. Finally the looping constructs are DO/WHILE, REPEAT/UNTIL and FOR/NEXT. They are called looping constructs because they allow a program to do the same thing over and over again like a tape loop. The DO/WHILE construct performs a sequence 0 or more times. The REPEAT/UNTIL loop performs a sequence 1 or more times. The FOR/NEXT loop repeats a sequence a fixed number of times usually known before the loop has begun.


It was not known until fairly recently that the first computers were and are within all living things.
Ribosomes (4,000,000 in every cell) read our DNA (split into RNA) as a program, take in amino acids as input and produce proteins as output. These proteins are long sequences of amino acids that fold up producing various facets that will self assemble with other exactly matching proteins that make all the tissues of our bodies.

Data

Where procedural languages diverge is in their data types and structures. A data structure is a repository for information that is manipulated by operators and functions. It is organized in such a way as to simplify the solution to a problem. There are very simple data structures that correspond to the native registers of the processor. These include bytes, words, multiple words and floating point numbers that correspond to hardware arithmetic units. There are stacks and finally strings. Beyond the native data structures there are higher level constructs that computerists love, like; heaps, and hashes. Modern languages support collections of data called structures or records.

Non-Procedural

Next there are a group of non procedural languages. Some of the most common are Lisp and Prolog. These list processors interpret statements containing data as rules and manipulate them to produce output. It was hoped in the 60s that these would be the basis for a class of artificially intelligent (or thinking) machines. Things have not worked out as we had hoped. Thinking is too complex. These languages are suitable for very narrow domains.

Back | Next



Copyright Spidel Tech Solutions, Inc. 2004 All Rights Reserved.  Updated: 9/5/2008 7:41:55 AM Idx: 1378 Site Design STS

This site is the home of Spidel School of Design
Please visit the Spidel Tech Blog.