what is source code

藏色散人
Release: 2019-01-16 10:17:13
Original
270466 people have browsed it

Source code is a list of human-readable instructions that programmers often write in word processing programs when developing programs. Source code is run through a compiler, converting it into machine code that a computer can understand and execute, also known as object code. Object code consists mostly of 1s and 0s, so it is not human readable.

what is source code

Source code example

Source code and object code are the before and after states of a compiled computer program. Programming languages for compiled code include C, C#, Delphi, Swift, Fortran, Haskell, Pascal, and many more. Here is an example of C language source code:

/* Hello World program */ #include main() { printf("Hello World") }
Copy after login

You don't have to be a computer programmer to tell that this code has to do with printing "Hello World". Of course, most source code is much more complex than this example. It's not uncommon for software programs to have millions of lines of code. According to reports, the Windows 10 operating system has approximately 50 million lines of code.

Source Code License

Source code can be proprietary or open. Many companies tightly guard their source code. Users can use the compiled code but cannot view or modify it. Microsoft Office is an example of proprietary source code. Other companies post their code on the Internet, where anyone can download it for free. Apache OpenOffice is an example of open source software code.

Interpreting Programming Language Code

Some programming languages, such as JavaScript, are not compiled into machine code but are instead interpreted. In these cases, the distinction between source and object code does not apply, since there is only one code. Individual codes are source code and can be read and copied. In some cases, the developer of this code may have intentionally encrypted it to prevent viewing. Interpreted programming languages include Python, Java, Ruby, Perl, PHP, Postscript, VBScript, and more.

The above is the detailed content of what is source code. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!