Iteration#Computing

The iterative programming (English to iterate = repeat ) is used in contrast to recursive programming no self- views, but loops ( repetitions of instructions or instruction sequences ). Thus, the typical stack overflows are prevented, and the programs are processed faster because the method calls omitted ( with context save ). In principle, recursive algorithms can be implemented iteratively, and vice versa; the recursive programming is simpler and easier to understand. An example of the iterative programming is a database passage ( Pascal )

Procedure run;   begin    while not Dataset.Eof do    begin     command1;     command2;     command3;     DataSet.next;    end;   end; Here are command1, -2 and -3 repeated until all records have been traversed.

  • Programming
  • Programming paradigm
420807
de