Program code

from Wikipedia, the free encyclopedia

As program code (or program code ) that are instructions which have in the context of software development for a particular computer program created or a part thereof and its functionality in a specific programming language describe or represent.


In general, the following types of program code are distinguished or designated as such:

  • Source text is the human-readable and mostly human-made form of a computer program.
(also called source , source , primary code or source program )
(is usually called differently depending on the platform: bytecode , object code , pseudocode or similar)
  • Machine code can be executed directly by a machine, but it is difficult or impossible for humans to read.
(also called machine program , binary program or similar)

Each program code relates to exactly one program or part of a program. The different code types build on one another; For example, the source text is the basis for the intermediate code, this for the machine code. As a rule, code is generated by programmers, the other types of code are generated automatically. The program codes of several functions / program parts are often combined at the next development stage, so that, for example, the machine code of an entire program (as the last stage) was created using several / many program code parts.

Delimitation / ambiguous use of the term

  • 'Program code' does not mean 'code' in the sense of language / syntax, but rather in the sense of 'program piece'.
  • In the literature, the term “program code” is sometimes used synonymously for only one of the aforementioned subspecies, in many cases only for “source text”, but also for other types of code, for example for “machine code”.
  • Instructions generated with declarative or graphical programming languages are only partially referred to as program code / source text (see example), but partially also as “opposite of program code” (= no program “text”), see example.

Formal differences

Program code variants differ considerably in terms of their structure, form, syntax, storage, etc. depending on the programming language and the programming tools used. In some cases, not all code variants occur (for example no intermediate code or no machine code), or they are named with other names (such as “bytecode”).

In some development environments between is managed code and unmanaged code distinction (English , managed ... ' and , unmanaged code ' called), see for example in Java or in the .NET -Sprachen. With managed code, among other things, memory management is largely taken over by the runtime environment and its translators .


As part of the development of program code, this is usually changed / corrected very often and at short notice (source text) or newly created (the other types). Program codes often only exist temporarily until the next work step or until the next software version, for example after a program error has been corrected .

Intangible term

'Program code' is an intangible term and can exist in different media, for example in the main memory of an editor (during the creation of source code), as a member of a program library or as an executable file (if it is saved), in the main memory of the computer (during execution of the program) or on paper (for example in a source text list).

From source code to execution

Before a computer program can be executed by a computer , it must be converted into machine language , i.e. into a sequence of bits that the computer can understand . This can be done either in advance by a compiler or - at runtime - by an interpreter or JIT compiler . In many cases a combination is now selected from the two variants, in which the translation time is translated to the source code of the actual programming in an abstract intermediate code, which is then at run time of a runtime environment is transferred by an interpreter or JIT compiler in the actual machine code. This principle has the advantage that one and the same intermediate code can be executed on a large number of different computer architectures and thus a separate version of the software does not have to appear for each target architecture. Typical examples of such an intermediate code are the Java bytecode and the Common Intermediate Language . Using a debugger , the functionality of the program can be followed during runtime.

See also

Wiktionary: Program code  - explanations of meanings, word origins, synonyms, translations

Individual evidence

  1. program code, program code - Duden , published 2018; u. a. under "overview of meanings" with " source code "
  2. Informatik DUDEN ISBN 3-411-05232-5 Edition 1993, p. 132 (program) code = "A program translated into a machine language"
  3. TUM Visualization of Abstract Machines ( PDF , ≈ 1  MB ) - University of Trier , published on March 5, 2001; u. a. with "[...] but in the translated program code, which is the input of the abstract machine, [...]"
  4. ^ National Instruments: The Benefits of Graphing Programming with NI LabVIEW - National Instruments , on Aug. 7, 2013; there was graphical block diagram of a program code referred
  5. 14.3 Trigger - Section in Visual C # 2008: Windows programming with the .NET Framework 3.5 , published by Jürgen Bayer via Markt-und-Technik-Verlag 2008; ISBN 978-3-8272-4339-3 , p. 899 (bottom), u. a. with "The whole does not require a single line of program code, but is completely (declaratively) defined in XAML."
  6. The memory management takes place less at the operating system level than at the application level - more precisely in the runtime environment (of the respective application or the so-called program ), also called a virtual machine (and e.g. in the case of Java Java VM )