Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Computer program
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Example computer program== The [["Hello, World!" program]] is used to illustrate a language's basic [[Syntax (programming languages)|syntax]]. The syntax of the language [[Dartmouth BASIC|BASIC]] (1964) was intentionally limited to make the language easy to learn.<ref name="cpl_3rd-ch2-30_quote1">{{cite book | last = Wilson | first = Leslie B. | title = Comparative Programming Languages, Third Edition | publisher = Addison-Wesley | year = 2001 | page = 30 | isbn = 0-201-71012-9 | quote = Their intention was to produce a language that was very simple for students to learn[.] }}</ref> For example, [[Variable (computer science)|variables]] are not [[Declaration (computer programming)|declared]] before being used.<ref name="cpl_3rd-ch2-31">{{cite book | last = Wilson | first = Leslie B. | title = Comparative Programming Languages, Third Edition | publisher = Addison-Wesley | year = 2001 | page = 31 | isbn = 0-201-71012-9 }}</ref> Also, variables are automatically initialized to zero.<ref name="cpl_3rd-ch2-31"/> Here is an example computer program, in Basic, to [[average]] a list of numbers:<ref name="cpl_3rd-ch2-30">{{cite book | last = Wilson | first = Leslie B. | title = Comparative Programming Languages, Third Edition | publisher = Addison-Wesley | year = 2001 | page = 30 | isbn = 0-201-71012-9 }}</ref> <syntaxhighlight lang="basic"> 10 INPUT "How many numbers to average?", A 20 FOR I = 1 TO A 30 INPUT "Enter number:", B 40 LET C = C + B 50 NEXT I 60 LET D = C/A 70 PRINT "The average is", D 80 END </syntaxhighlight> Once the mechanics of basic computer programming are learned, more sophisticated and powerful languages are available to build large computer systems.<ref name="cpl_3rd-ch2-30_quote2">{{cite book | last = Wilson | first = Leslie B. | title = Comparative Programming Languages, Third Edition | publisher = Addison-Wesley | year = 2001 | page = 30 | isbn = 0-201-71012-9 | quote = The idea was that students could be merely casual users or go on from Basic to more sophisticated and powerful languages[.] }}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Computer program
(section)
Add topic