FACTOID # 31: Almost half of Ecuador is subject to environmental protection.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RELATED ARTICLES
People who viewed "Iterative" also viewed:
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Iterative

Iteration is the repetition of a process, typically within a computer program. Confusingly, it can be used both as a general term, synonymous with repetition, and to describe a specific form of repetition with a mutable state.


When used in the first sense, recursion is an example of iteration.


However, when used in the second (more restricted) sense, iteration describes the style of programming used in imperative programming languages. This contrasts with recursion, which has a more declarative approach.


Here is an example of iteration, in imperative pseudocode:

 var i, a := 0 // initialize a before iteration for i from 1 to 3 { // loop three times a := a + i // increment a by the current value of i } print a // the number 6 is printed 

In this program fragment, the value of the variable i changes over time, taking the values 1, 2 and 3. This changing value—or mutable state—is characteristic of iteration.


Iteration can be done in functional programming languages. The following example is in Scheme:

 (define (sum n) (define (iter i result) (if (<= i n) (+ i (iter (+ i 1) result)) result)) (iter 0 0)) 

An iterator is an object that wraps iteration.


See also


  Results from FactBites:
 
ITER - Wikipedia, the free encyclopedia (3035 words)
ITER is an international tokamak (magnetic confinement fusion) experiment, planned to be built in France and designed to show the scientific and technological feasibility of a full-scale fusion power reactor.
ITER is designed to produce approximately 500 MW (500,000,000 watts) of fusion power sustained for up to 500 seconds (compared to JET's peak of 16 MW for less than a second).
Construction of the ITER complex is planned to begin in 2008[5], while assembly of the tokamak itself is scheduled to begin in the year 2011.
Issues in S and T, Summer 1997, The ITER Decision and U.S. Fusion R&D (4054 words)
ITER is the product of a years-long collaboration among several countries that is both a major advance in fusion science and a major step toward a safe and inexhaustible energy supply for humanity: practical power from fusion.
ITER would be the first experiment in the world capable of definitively exploring the physics of burning plasmas-plasmas in which most of the power that maintains the plasma at thermonuclear temperatures is provided by the deuterium-tritium fusion events themselves.
ITER construction funding should be budgeted as a line item separate from the budget of the U.S. national fusion program in order to ensure the continued strength of the latter.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.