Source code

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Text-based source code formats)
(Text-based source code formats)
Line 25: Line 25:
 
The language can usually be identified by the file extension.
 
The language can usually be identified by the file extension.
  
* [[.asm]] Assembler   
+
* [[asm]] - [[Assembler]]  
* [[.s]] Assembler   
+
* [[s]] - [[Assembler]]  
* [[.sh]] Bourne shell script
+
* [[sh]] - [[Bourne shell script]]
* [[c]] C
+
* [[c]] - [[C]]
* [[cc]] C
+
* [[cc]] - [[C]]
* [[h]] C
+
* [[h]] - [[C]]
* [[cpp]] C++
+
* [[cpp]] - [[C++]]
* [[cxx]] C++
+
* [[cxx]] - [[C++]]
* [[cs]] C#
+
* [[cs]] - [[C#]]
* [[j]] Java  
+
* [[j]] - [[Java]]
* [[jav]] Java  
+
* [[jav]] - [[Java]]
* [[java]] Java  
+
* [[java]] - [[Java]]
* [[js]] JavaScript
+
* [[js]] - [[JavaScript]]
* [[m]] Matlab  
+
* [[m]] - [[Matlab]]
* [[pas]] Pascal  
+
* [[pas]] - [[Pascal]]
* [[pcl]] PCL  -- DEC TOPS-20 Programmable Command Language
+
* [[pcl]] - [[PCL]] -- DEC TOPS-20 Programmable Command Language
* [[pl]] Perl  
+
* [[pl]] - [[Perl]]
* [[pm]] Perl
+
* [[pm]] - [[Perl]]
* [[php]] PHP  
+
* [[php]] - [[PHP]]
* [[py]] [[Python]]
+
* [[py]] - [[Python]]
* [[pyc]] [[Python]]
+
* [[pyc]] - [[Python]]
* [[pyo]] [[Python]]
+
* [[pyo]] - [[Python]]
 
* [[pyd]] [[Python]]
 
* [[pyd]] [[Python]]

Revision as of 23:55, 19 November 2012

File Formats > Electronic File Formats > Source code

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.

Non-text-based source code formats

  • Tokenized BASIC (.bas)
    • Apple Integer BASIC
    • Applesoft BASIC
    • Atari BASIC
    • Commodore BASIC
    • GW-BASIC / BASICA (IBM PC and compatibles)
    • TRS-80 BASIC

Text-based source code formats

The language can usually be identified by the file extension.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox