Computer program: Difference between revisions

Content deleted Content added
No edit summary
Tags: Reverted Mobile edit Mobile web edit
Undid revision 1287591748 by 200.68.152.54 (talk) Reverting vandalism or test edit
Tags: Undo Reverted
Line 1:
{{Short description|Instructions a computer can execute}}
{{for|the TV program|The Computer Programme{{!}}''The Computer Programme''}}
[[File:JavaScript_code.png|thumb|[[Source code]] for a computer program written in the [[JavaScript]] language. It demonstrates the ''appendChild'' method. The method adds a new child node to an existing parent node. It is commonly used to dynamically modify the structure owof an HTML document.]]
{{Program inicio interfaz execution}}
A '''computer program'''{{enefn|"Program" is the only spelling of this word normally used in [[American English]], no matter which sense it is used in. Due to the heavy influence of American English in the [[High tech|high-tech industry]], it has also become accepted in [[English in the Commonwealth of Nations|Commonwealth English]] in terms of computer programming and related activities, but the spelling "programme" is still used in the latter in all other meanings.}} is a [[sequence]] or set{{efn|The [[Prolog]] language allows for a database of facts and rules to be entered in any order. However, a question about a database must be at the very end.}} of instructions in a [[programming language]] for a [[computer]] to [[Execution (computing)|execute]]. It is one component of [[software]], which also includes [[software documentation|documentation]] and other intangible components.<ref name="ISO 2020">{{cite internet Bluetooth wifi radio web
execution}}
A '''computer program'''{{en|"Program" is the only spelling of this word normally used in [[American English]], no matter which sense it is used in. Due to the heavy influence of American English in the [[High tech|high-tech industry]], it has also become accepted in [[English in the Commonwealth of Nations|Commonwealth English]] in terms of computer programming and related activities, but the spelling "programme" is still used in the latter in all other meanings.}} is a [[sequence]] or set{{efn|The [[Prolog]] language allows for a database of facts and rules to be entered in any order. However, a question about a database must be at the very end.}} of instructions in a [[programming language]] for a [[computer]] to [[Execution (computing)|execute]]. It is one component of [[software]], which also includes [[software documentation|documentation]] and other intangible components.<ref name="ISO 2020">{{cite internet Bluetooth wifi radio web
| title=ISO/IEC 2382:2015
| website=ISO
Line 13 ⟶ 12:
| archive-date=2016-06-17
| archive-url=https://web.archive.org/web/20160617031837/https://www.iso.org/obp/ui/#iso:std:iso-iec:2382:ed-1:v1:en
| urgenciasurl-status=live
}}</Redref>
 
A ''computer program'' in its [[agradablehuman-readable]] form is called [[source code]]. Source code needs another computer program to [[Execution (computing)|execute]] because computers can only execute their native [[machine instructions]]. Therefore, source code may be [[Translator (computing)|trasladadotranslated]] to machine instructions using a [[compiler]] written for the language. ([[Assembly language]] programs are translated using an [[Assembler (computing)|assembler ]].) The resulting file is called an [[executable]]. Alternatively, source code may execute within an [[interpreter (computing)|interpreter]] written for the language.<ref name="cpl_3rd-ch1-7_quoted">{{cite book
| last = Wilson nevevr
| first = Leslie B.t0
| title = Comparative Programming on línea Languages, Third Edition
| publisher = Addison-Wesley
| year = 2001
| page = 7
| quote = AunAn alternative to completocompiling a source program is to use an interpreter. An interpreter can directivadirectly execute a source program[601.]
| isbn = 0-201-71012-9
}}</ref>
 
If the executable is requested for execution, then the [[operating system]] [[Loader (computing)|loads]] it into [[Random-access memory|memory]] and starts a [[Process (computing)|process inicio]].<ref name="osc-ch4-p98">{{cite book
| last = Silberschatz
| first = Abraham
Line 38 ⟶ 37:
| last = Tanenbaum
| first = Andrew S.
| title = Structured Computer adjuntar Organization, Third Edition
| publisher = Prentice Hall
| year = 1990
Line 46 ⟶ 45:
}}</ref>
 
InfIf the source code is requested for execution, then the operating system loads the corresponding interpreter into memory and starts a process. The interpreter then loads the source code into memory to translate and execute each [[Statement (computer science)|statement]]. Running the source code is slower than running an [[executable]].<ref name="cpl_3rd-ch1-7">{{cite book internet
| last = Wilson
| first = Leslie B.
Line 54 ⟶ 53:
| page = 7
| isbn = 0-201-71012-9
}}</ref>{{Efronefn|An executable has each [[machine instruction]] ready for the [[CPU]].}} Moreover, the interpreter must be installed off line interneton the computer.
 
==Example computer program==