Code

Updated: 08/02/2020 by Computer Hope

Code may refer to any of the following:

Computer programming

1. Code (short for source code) is a term used to describe text that is written using the protocol of a particular language by a computer programmer. Examples of programming languages include C, C#, C++, Java, Perl, and PHP. Code can also be used in a less formal fashion to refer to text written for markup or styling languages, like HTML and CSS (Cascading Style Sheets). For example, you may see people make reference to code in numerous languages, such as "C code," "PHP code," "HTML code," or "CSS code."

An example of C# scripting code that prints "Hello, World!" to the screen is displayed below.

public class HelloWorld
{
 public static void Main()
 {
  System.Console.WriteLine("Hello World!");
 }
}

Below is an example of Perl scripting code that prints "Hello World!" to the screen.

#!/usr/bin/perl
print "Hello World!\n";

2. When writing in HTML, the <code> tag is used to designate that a section of text is computer code.

3. When describing a hardware identification number, a code may refer to a serial number or model number. With software, a code may refer to the CD key or activation code.

Codename, Computer abbreviations, Programming terms, Source code