Friday, December 27, 2019
What Is Source Code in Computer Programming
Sourceà code is the list of human-readable instructions that a programmer writesââ¬âoften in a word processing programââ¬âwhen he is developing a program. The source code is run through aà compilerà to turn it into machine code, also called object code, that a computer can understand and execute. Object code consists primarily of 1s and 0s, so it isnt human-readable.à Source Code Example Source code and object code are the before and after states of a computer program that is compiled. Programming languages that compile their code include C, C, Delphi, Swift, Fortran, Haskell, Pascal and many others. Here is an example of Cà language source code: /* Hello World program */#includestdio.hmain(){printf(Hello World)} You dont have to be a computer programmer to tell that this code has something to do with printing Hello World. Of course, most source code is much more complex than this example. It is not unusual for software programs to have millions of lines of code. Windows 10 operating system is reported to have about 50 million lines of code. Source Code Licensing Source code can be either proprietary or open. Many companies closely guard their source code. Users can use the compiled code, but they cannot see or modify it. Microsoft Office is an example of proprietary source code. Other companies post their code on the internet where it is free to anyone to download. Apache OpenOffice is an example of open source software code. Interpreted Program Languages Code Some programming languages such as JavaScript are not compiled into machine code but areà interpretedà instead. In these cases, the distinction between source code and object code does not apply because there is only one code. That single code is the source code, and it can be read and copied. In some cases, developers of this code may intentionally encrypt it to prevent viewing. Programming languages that are interpreted include Python, Java, Ruby, Perl, PHP, Postscript, VBScript and many others.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.