Information Processing Language


Information Processing Language (IPL) is a programming language created by Allen Newell, Cliff Shaw, and Herbert A. Simon at RAND Corporation and the Carnegie Institute of Technology at about 1956. Newell had the job of language specifier-application programmer, Shaw was the system programmer, and Simon took the job of application programmer-user.

The language includes features intended to help with programs that perform simple problem solving actions such as lists, dynamic memory allocation, data types, recursion, functions as arguments, generators, and cooperative multitasking. IPL invented the concept of list processing, albeit in an assembly-language style.

An IPL computer has:
  1. a set of symbols. All symbols are addresses, and name cells. Unlike symbols in later languages, symbols consist of a character followed by a number, and are written H1, A29, 9-7, 9-100.
    1. Cell names beginning with a letter are regional, and are absolute addresses.
    2. Cell names beginning with "9-" are local, and are meaningful within the context of a single list. One list's 9-1 is independent of another list's 9-1.
    3. Other symbols (e.g., pure numbers) are internal.
  2. a set of cells. Lists are built from several cells holding mutual references. Cells have several fields:
    1. P, a 3-bit field used for an operation code when the cell is used as an instruction, and unused when the cell is data.
    2. Q, a 3-valued field used for indirect reference when the cell is used as an instruction, and unused when the cell is data.
    3. SYMB, a symbol used as the value in the cell.
  3. a set of primitive processes, which would be termed primitive functions in modern languages.
The data structure of IPL is the list, but lists are more intricate structures than in many languages. A list consists of a singly linked sequence of symbols, as might be expected -- plus some description lists, which are subsidiary singly linked lists interpreted as alternating attribute names and values. IPL provides primitives to access and mutate attribute value by name. The description lists are given local names (of the form 9-1). So, a list called L1 holding the symbols S4 and S5, and described by associating value V1 to attribute A1 and V2 to A2, would be stored as follows. 0 indicates the end of a list; the cell names 100, 101, etc. are automatically generated internal symbols whose values are irrelevant. These cells can be scattered throughout memory; only L1, which uses a regional name that must be globally known, needs to reside in a specific place.


Whenever I’m TA for a introductory CS class where students learn some programming language, I have trouble coming up with good exercises. Problems from Project Euler and the like are usually much too difficult for beginners, especially if they don’t have a strong background in mathematics.

This page is a collection of progressively more difficult exercises that are suitable for people who just started learning. It will be extended as I come up with new exercises. Except for the GUI questions, exercises are generally algorithmic and should be solvable without learning any libraries. The difficulty of the exercises of course somewhat depends on the programming language you use. The List exercises for example are more complicated in languages like C that don’t have build-in support for lists.
I suppose they are also useful, although much easier, whenever an experienced person wants to learn a new language.

Click the link below for more samples
http://cs.boisestate.edu/~amit/prog-contest/sample-problems.html


C language elements

Elements of the C Language - Identifiers, Keywords, Data types and Data objects

The C Character Set

C uses the uppercase English alphabets A to Z, the lowercase letters a to z, the digits 0 to 9, and certain special characters as building blocks to form basic program elements viz. constants, variables, operators, expressions and statements.

Identifiers and Keywords

Identifiers are names given to various items in the program, such as variables, functions and arrays. An identifier consists of letters and digits, in any order, except that the first character must be a letter. Both upper and lowercase letters are permitted. Upper and lowercase letters are however not interchangeable (i.e., an uppercase letter is not equivalent to the corresponding lowercase letter). The underscore character (_) can also be included, and it is treated as a letter. Keywords like if, else, int, float, etc., have special meaning and they cannot be used as identifier names.

The following are examples of valid identifier names: A, ab123, velocity, stud_name, circumference, Average, TOTAL

Constants

The constants in C can be classified into four categories namely integer constants, floating point constants, character constants and string constants.

A character constant is written as for example - 'A' (always enclosed in single quotes).

Examples of string constants are - "Jamshedpur", "A", etc. Note that a string constant is always enclosed within double quotes.

A normal integer constant is written as 1234.

A long int is recognized by the presence of L (uppercase or lowercase) at the end of the constant, e.g. 2748723L.

The suffix u or U signifies the int to be an unsigned one.

The UL or ul at the end indicates the int quantity is of unsigned long type

Floating point constants contain a decimal point (167.903) or an exponent (1e-2) or both. Their type is double unless suffixed. The suffix of f or F indicates float; 1 or L indicates long double.

C also supports octal and hexadecimal data. The value of an integer data can be specified in either octal or hexadecimal form. A hexadecimal constant must begin with 0x or 0X, a leading 0 indicates the octal representation. Octal and hexadecimal constants may also be followed by U to indicate unsigned or L to determine long.

click this link for more resources
http://www.how2lab.com/programming/c/data-types.php#.VBudlqFR65c