previous next Up Title Contents

Looping using "Repeat"

There are occasions when it is necessary to repeat a particular section of a simulation. This can be done using the repeat loop instruction, enclosing everything to be repeated in curly brackets.

# A simple simulation specification

begin {

PureTone < PTone1.par # Stimulus module

PreEmphasis_BandPass < PreEmph1.par

BasilarM_GammaT < GammaT1k.par

IHC_Meddis86 < Meddis96.par

repear 60 {

ANSpikeGen_Simple < SpikeGen1.par

Analysis_Histogram < PSTHHist1.par

}

}

Figure [29] Example 2 Note that the number of required repeats is inserted after the word, "repeat", but before the opening curly bracket, "{".


previous next Up Title Contents