Source code

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Text-based source code formats: Trying to link extensions just makes a mess.)
(Links)
 
(29 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{|
+
{{FormatInfo
|[[File Formats]]
+
|formattype=electronic
| >
+
|thiscat=Source code
|[[Electronic File Formats]]
+
|image=Perlcode.png
| >
+
}}
|[[Source code]]
+
|}
+
  
 
'''Source code''' is the program code of a [[Programming Languages|programming language]] as stored in a computer's memory or in a file or other storage medium (programs have been stored on [[cassette]]s, [[punched card]]s, and many other media). Except in interpreted languages (like BASIC) which execute the program directly from the source, source code needs to be compiled or assembled into [[executables]] in the target machine code (possibly passing through intermediate stages of object code needing to be linked or code in some intermediary language that is in turn compiled, assembled or interpreted).
 
'''Source code''' is the program code of a [[Programming Languages|programming language]] as stored in a computer's memory or in a file or other storage medium (programs have been stored on [[cassette]]s, [[punched card]]s, and many other media). Except in interpreted languages (like BASIC) which execute the program directly from the source, source code needs to be compiled or assembled into [[executables]] in the target machine code (possibly passing through intermediate stages of object code needing to be linked or code in some intermediary language that is in turn compiled, assembled or interpreted).
Line 13: Line 11:
 
== Non-text-based source code formats ==
 
== Non-text-based source code formats ==
  
* [[bas]] - [[Tokenized BASIC]]
+
* [[APL]]
** Apple Integer BASIC
+
** [[APL workspace]]: .apl, .atf, .dws, .dxf
** Applesoft BASIC
+
* [[BASIC]]
** Atari BASIC
+
** [[Tokenized BASIC]]: .bas
** Commodore BASIC
+
* [[Scratch]]
** GW-BASIC / BASICA (IBM PC and compatibles)
+
** [[Scratch 1.4 File Format]] .sb, .sprite
** TRS-80 BASIC
+
** [[Scratch 2.0 File Format]] .sb2
  
 
== Text-based source code formats ==
 
== Text-based source code formats ==
  
The language can usually be identified by the file extension (list has the file extensions first, followed by the associated language).
+
Programming languages that use a plain text source code format are not listed here. Refer to [[Programming Languages]] instead.
  
* [[Assembler]]: .asm, .s
+
== Source metadata ==
* [[Bourne shell script]]: .sh
+
* [[Debian source control file]]
* [[C]]: .c, .cc, .h
+
* [[Emacs file variable]]
* [[C++]]: .cpp, .cxx
+
* [[Shebang]]
* [[C#]]: .cs
+
 
* [[Java]] : .j, .jav, .java
+
== See also ==
* [[JavaScript]]: .js
+
* [[Development]]
* [[Matlab]]: .m
+
* [[Executables]]
* [[Music Macro Language]]: .mmi
+
* [[Programming Languages]]
* [[Pascal]]: .pas
+
* [[Document#Documentation combined with source code]]
* [[PCL]]: .pcl  -- DEC TOPS-20 Programmable Command Language
+
 
* [[Pixilang]]: .pixi
+
== Links ==
* [[Perl]]: .pl, .pm
+
* [http://www.cooperhewitt.org/object-of-the-day/2013/08/26/planetary-collecting-and-preserving-code-living-object Planetary: collecting and preserving code as a living object]
* [[PHP]]: .php
+
* [https://www.sourcecodepoetry.com/ Source Code Poetry]
* [[Python]]: .py, .pyc, .pyo, .pyd
+

Latest revision as of 04:56, 30 October 2020

File Format
Name Source code
Ontology

{{{caption}}}

Source code is the program code of a programming language as stored in a computer's memory or in a file or other storage medium (programs have been stored on cassettes, punched cards, and many other media). Except in interpreted languages (like BASIC) which execute the program directly from the source, source code needs to be compiled or assembled into executables in the target machine code (possibly passing through intermediate stages of object code needing to be linked or code in some intermediary language that is in turn compiled, assembled or interpreted).

Most of the time, program source code is stored as plain text (in a character encoding), so it can be viewed or edited in any text viewer or editor, though programmer-oriented development environments offer enhanced features such as language-specific syntax highlighting and integrated access to compilers. However, there are also some specialized source code formats that do not use plain text, instead doing some sort of tokenization to the keywords and syntactic elements of the language. This was more common on early computers that had much more limited memory, disk space, and bandwidth than the present ones.

Contents

[edit] Non-text-based source code formats

[edit] Text-based source code formats

Programming languages that use a plain text source code format are not listed here. Refer to Programming Languages instead.

[edit] Source metadata

[edit] See also

[edit] Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox