Home Page - YouTube Channel



Programming language - Simple English Wikipedia, the free encyclopedia

Programming language

From the Simple English Wikipedia, the free encyclopedia that anyone can change

A programming language is the language that a programmer uses to write a computer program.

Contents

[change] Characteristics

A programming language is not a spoken language. It is a way of describing what the programmer wants the computer to do. The programmer uses a programming language to tell the computer how to do calculations. Because programming languages are used for talking to the computer, the programmer needs to be very careful about how he tells the computer what to do. If he makes a mistake, the computer might not be able to tell him about it.

[change] Naming

A piece of a computer program is sometimes called a piece of code, or source code, and the actual writing of a piece of source code is called coding.

[change] Types of language

Depending on how programmers tell the computer what to do, the whole group of programming languanges can be split up as follows:

  • They can be imperative or declarative.
  • They can be functional or procedural.
  • They can be object-oriented or flow-oriented.

[change] Rules

Every programming language has rules about what it can and cannot do.

For example:

  • What kinds of numbers and words can the programmer use
  • What actions can the programmer tell the computer to do
  • What two pieces of code can be used

Most languages that are used by many people, or that have been used for a long time, have official standards that tell programmers how to program in these languages. Some programming languages have two or more standards. This might happen because an old standard was replaced by a new standard; for example, the Perl 5 standard replaced the Perl 4 standard in 1993. Or it might happen because two people made two different standards at the same time; for example, there are a few different standards for the APL programming language.

[change] Design philosophies

Many programming languages have one special philosophy that tells the people who made the language how to make it all work together. Maybe the language uses data structures in a special way (for example, Lisp uses lists for many things), or maybe the language is written in a special way (for example, Perl uses many English words in its code).

[change] Interpretation

Programming languages can be compiled or interpreted. Interpreted programming languages are languages where the programmer gives the source code to the computer, and the computer reads it and does what it says, right away. This is called running the program. Compiled programming languages are languages where a special computer program called a compiler reads the source code and generates a binary program written in machine language. The programmer can run that machine-language program on any computer any time he wants to. He does not need the compiler after he has compiled the program already.

[change] Examples

[change] Example of Visual Basic

Here is a simple program written in Visual Basic:

Dim Input
Input = InputBox("How old are you?")
If Not IsNumeric(Input) Then
  MsgBox "That's not a number!"
ElseIf Input < 0 Then
  MsgBox "You cannot be less than zero!"
ElseIf Input > 100 Then
  MsgBox "That's old!"
Else
  MsgBox "You're " & Input & " years old."
End If

[change] Example of Python

Here is a program that does the same thing as the program above, but in Python:

try:
    age = int(raw_input("How old are you? "))
    if age < 0:
        print "You cannot be less than zero!"
    elif age > 100:
        print "That's old!"
    else:
        print "You're %s years old." % age
except ValueError:
    print "That's not a number!"

[change] Some programming languages currently in use

[change] See also

Wikipedia HTML 2008 in other languages

100 000 +

Česká (Czech)  •  English  •  Deutsch (German)  •  日本語 (Japanese)  •  Français (French)  •  Polski (Polish)  •  Suomi (Finnish)  •  Svenska (Swedish)  •  Nederlands (Dutch)  •  Español (Spanish)  •  Italiano (Italian)  •  Norsk (Norwegian Bokmål)  •  Português (Portuguese)  •  Română (Romanian)  •  Русский (Russian)  •  Türkçe (Turkish)  •  Українська (Ukrainian)  •  中文 (Chinese)

10 000 +

العربية (Arabic)  •  Български (Bulgarian)  •  Bosanski (Bosnian)  •  Català (Catalan)  •  Cymraeg (Welsh)  •  Dansk (Danish)  •  Ελληνικά (Greek)  •  Esperanto  •  Eesti (Estonian)  •  Euskara (Basque)  •  Galego (Galician)  •  עברית (Hebrew)  •  हिन्दी (Hindi)  •  Hrvatski (Croatian)  •  Magyar (Hungarian)  •  Ido  •  Bahasa Indonesia (Indonesian)  •  Íslenska (Icelandic)  •  Basa Jawa (Javanese)  •  한국어 (Korean)  •  Latina (Latin)  •  Lëtzebuergesch (Luxembourgish)  •  Lietuvių (Lithuanian)  •  Latviešu (Latvian)  •  Bahasa Melayu (Malay)  •  Plattdüütsch (Low Saxon)  •  Norsk (Norwegian Nynorsk)  •  فارسی (Persian)  •  Sicilianu (Sicilian)  •  Slovenčina (Slovak)  •  Slovenščina (Slovenian)  •  Српски (Serbian)  •  Basa Sunda (Sundanese)  •  தமிழ் (Tamil)  •  ไทย (Thai)  •  Tiếng Việt (Vietnamese)

1 000 +

Afrikaans  •  Asturianu (Asturian)  •  Беларуская (Belarusian)  •  Kaszëbsczi (Kashubian)  •  Frysk (Western Frisian)  •  Gaeilge (Irish)  •  Interlingua  •  Kurdî (Kurdish)  •  Kernewek (Cornish)  •  Māori  •  Bân-lâm-gú (Southern Min)  •  Occitan  •  संस्कृत (Sanskrit)  •  Scots  •  Tatarça (Tatar)  •  اردو (Urdu) Walon (Walloon)  •  יידיש (Yiddish)  •  古文/文言文 (Classical Chinese)

100 +

Nehiyaw (Cree)  •  словѣньскъ (Old Church Slavonic)  •  gutisk (Gothic)  •  ລາວ (Laos)