Control Structures: Difference between revisions

From Rosetta Code
Content added Content deleted
mNo edit summary
(Beefed up a bit...encyclopedia articles should have more information)
 
(35 intermediate revisions by 9 users not shown)
Line 1: Line 1:
[[Category:Encyclopedia]]'''Control structures''' are features of programming languages that influence the code flow. Examples of control structures are:
[http://students.hsc.unt.edu/housing/item.cfm?type=2918 cool ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30250 viagra online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=219 alltel ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a1e flexeril online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30364 ericsson ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=198 cheap hoodia] [http://news.engin.brown.edu/forums/thread-view.asp?tid=221 free cool ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=98 online lisinopril] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=227 cheap ultracet] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=161 cheap albuterol] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30363 sony ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2892 cheap rivotril] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=204 cheap ortho] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=129 sony ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=79 cheap clonazepam] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=238 sharp ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1363 cyclobenzaprine online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=203 norco] [http://library.cshl.edu/wp/vb/member.php?u=1351 buy adipex] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=339 cheap ultram] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30318 diethylpropion online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=209 xenical] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30260 cheap clonazepam] [http://library.cshl.edu/wp/vb/member.php?u=1368 free nokia ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a19 mp3 ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=225 kyocera ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=195 rivotril online] [http://students.hsc.unt.edu/housing/item.cfm?type=2865 paxil online] [http://students.hsc.unt.edu/housing/item.cfm?type=2873 cheap nexium] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=114 pharmacy online online] [http://wc1.worldcrossing.com/WebX/.1de609df cheap ambien] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=338 fioricet] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30262 order paxil] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=173 cool ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=178 nexium online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=147 zoloft online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=235 tenuate] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30365 mtv ringtones] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=342 order diazepam] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30323 online flexeril] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=122 rivotril online] [http://students.hsc.unt.edu/housing/item.cfm?type=2913 free sonyericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de609ed buy hoodia] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=119 free punk ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=196 free motorola ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30278 nexium online] [http://wc1.worldcrossing.com/WebX/.1de60a36 cheap zyban] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=127 buy soma] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30277 buy cyclobenzaprine] [http://wc1.worldcrossing.com/WebX/.1de60a30 xenical online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=109 nextel ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30243 cheap ultram] [http://wc1.worldcrossing.com/WebX/.1de609e1 carisoprodol online] [http://library.cshl.edu/wp/vb/member.php?u=1376 free motorola ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=198 mtv ringtones] [http://wc1.worldcrossing.com/WebX/.1de609dd alltel ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2921 free wwe ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=75 cheap celexa] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=215 buy zoloft] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=175 cheap diazepam] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=236 tracfone ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2908 free music ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30314 buy pharmacy online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=161 cheap viagra] [http://news.engin.brown.edu/forums/thread-view.asp?tid=170 hydrocodone online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=164 order norco] [http://wc1.worldcrossing.com/WebX/.1de60a35 free verizon ringtones] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=336 carisoprodol online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=70 free alltel ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=207 xanax online] [http://wc1.worldcrossing.com/WebX/.1de60a28 soma online] [http://wc1.worldcrossing.com/WebX/.1de60a24 cheap propecia] [http://wc1.worldcrossing.com/WebX/.1de60a21 paxil online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30320 cheap rivotril] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30324 online hoodia] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30352 free sony ericsson ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2894 buy flexeril] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30266 lorazepam online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=166 cheap alprazolam] [http://library.cshl.edu/wp/vb/member.php?u=1343 cheap carisoprodol] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=120 qwest ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a06 order tenuate] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=192 lortab online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=95 kyocera ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=181 cheap sildenafil] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=140 vicodin online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=71 buy alprazolam] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=125 free sharp ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2917 punk ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=192 cheap vigrx] [http://wc1.worldcrossing.com/WebX/.1de609f2 meridia] [http://library.cshl.edu/wp/vb/member.php?u=1374 free qwest ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=205 nextel ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=81 buy cyclobenzaprine] [http://wc1.worldcrossing.com/WebX/.1de60a14 free jazz ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30327 buy zyban] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30245 cialis] [http://students.hsc.unt.edu/housing/item.cfm?type=2855 diazepam online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=194 diethylpropion online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=187 kyocera ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30317 cheap zanaflex] [http://library.cshl.edu/wp/vb/member.php?u=1345 ultram online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30265 ambien online] [http://library.cshl.edu/wp/vb/member.php?u=1372 free mp3 ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=107 free music ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=185 cheap zoloft] [http://wc1.worldcrossing.com/WebX/.1de609f1 lortab online] [http://wc1.worldcrossing.com/WebX/.1de60a2e xanax online] [http://wc1.worldcrossing.com/WebX/.1de60a0b cheap vigrx] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30297 cheap albuterol] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30361 free kyocera ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=103 mono ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=97 cheap lipitor] [http://library.cshl.edu/wp/vb/member.php?u=1366 propecia online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=155 xanax online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=177 cheap propecia] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=85 free ericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de609fb ortho online] [http://wc1.worldcrossing.com/WebX/.1de609ec buy hgh] [http://library.cshl.edu/wp/vb/member.php?u=1370 tracfone ringtones] [http://wc1.worldcrossing.com/WebX/.1de609e3 cheap clomid] [http://wc1.worldcrossing.com/WebX/.1de60a29 buy tramadol] [http://students.hsc.unt.edu/housing/item.cfm?type=2889 vigrx online] [http://wc1.worldcrossing.com/WebX/.1de60a18 motorola ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=121 real ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=162 meridia online] [http://students.hsc.unt.edu/housing/item.cfm?type=2886 ortho online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=213 polyphonic ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=135 cheap ultracet] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30335 nextel ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2881 cheap lisinopril] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=241 sony ericsson ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=128 sony ericsson ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2916 free alltel ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2897 nokia ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a0f cialis online] [http://wc1.worldcrossing.com/WebX/.1de60a09 viagra online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=207 real ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a0e celexa online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=229 valium online] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=354 free nokia ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2866 cheap levitra] [http://news.engin.brown.edu/forums/thread-view.asp?tid=200 free nokia ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=200 online nexium] [http://news.engin.brown.edu/forums/thread-view.asp?tid=214 free cingular ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2910 polyphonic ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2891 buy diethylpropion] [http://students.hsc.unt.edu/housing/item.cfm?type=2885 tenuate online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=159 cheap cialis] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30366 free jazz ringtones] [http://wc1.worldcrossing.com/WebX/.1de609fa online pharmacy] [http://wc1.worldcrossing.com/WebX/.1de60a22 phentermine] [http://news.engin.brown.edu/forums/thread-view.asp?tid=208 motorola ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1357 cheap levitra] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=195 mono ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=199 zyban online] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=363 free samsung ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2901 mp3 ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30235 soma online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=136 cheap ultram] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=72 ambien online] [http://students.hsc.unt.edu/housing/item.cfm?type=2862 buy vicodin] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30258 cheap vicodin] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=182 funny ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2890 zanaflex online] [http://wc1.worldcrossing.com/WebX/.1de609dc buy albuterol] [http://wc1.worldcrossing.com/WebX/.1de60a20 cheap nexium] [http://students.hsc.unt.edu/housing/item.cfm?type=2875 buy propecia] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=165 ambien] [http://wc1.worldcrossing.com/WebX/.1de609f8 free nokia ringtones] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=350 alprazolam] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=139 viagra online] [http://students.hsc.unt.edu/housing/item.cfm?type=2874 ultracet online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=91 hoodia online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=175 cyclobenzaprine online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=201 free ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=153 phentermine online] [http://students.hsc.unt.edu/housing/item.cfm?type=2848 cheap soma] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30337 free real ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=94 free jazz ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a0a vicodin] [http://students.hsc.unt.edu/housing/item.cfm?type=2896 buy zyban] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=178 free ericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a01 free sagem ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1346 diazepam online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=222 free sharp ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a1d cingular ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30230 but adipex] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=138 free verizon ringtones] [http://wc1.worldcrossing.com/WebX/.1de609fe qwest ringtones] [http://wc1.worldcrossing.com/WebX/.1de609e4 cheap clonazepam] [http://wc1.worldcrossing.com/WebX/.1de60a31 zanaflex online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=106 free mtv ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a1a free mtv ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a15 free kyocera ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=218 free sony ericsson ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=132 tenuate online] [http://students.hsc.unt.edu/housing/item.cfm?type=2904 free real ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=137 valium online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=168 paxil online] Control structures are features of programming languages that influence the code flow. Two common examples are loops and conditions.
*loops, which repeat sections of code
*conditions, which selectively execute sections of code
*exceptions, which help in error handling and avoid causing more problems when there is another problem
*jumps (a.k.a. "branches" or "gotos"), which explicitly and usually unconditionally set the next instruction to be executed by the program


Examples of these structures can be found on the following pages:
Due to volume and relative ease of segregation, the code examples on this page were moved to the following articles.


* [[Conditional Structures]]
* [[Conditional Structures]]

Latest revision as of 20:37, 22 October 2008

Control structures are features of programming languages that influence the code flow. Examples of control structures are:

  • loops, which repeat sections of code
  • conditions, which selectively execute sections of code
  • exceptions, which help in error handling and avoid causing more problems when there is another problem
  • jumps (a.k.a. "branches" or "gotos"), which explicitly and usually unconditionally set the next instruction to be executed by the program

Examples of these structures can be found on the following pages: