boucle

dear,
I'm beginning of Igor pro. I have some problem about this boucle for andfor, do while, if andif. what context do you use this boucle.
The pairs for ... endfor and do ... while are structures to manage repetitive tasks, e.g., automatically fit 10 spectra with identical start values.
The if ... endif pair is used to run a certain part of a code in case a logic expression is true, e.g. a>b.

Details are given in the manual and in the online help.
displayhelptopic "Loops"
displayhelptopic "Conditional Statements In Functions"


If you are new to Igor (and programming in general) I would highly recommend to read the first chapters of the manual and do the guided tour.
HJ
i += 1 // Increment the loop variable.
It increments the loop variable by one. ( // starts a comment)

Please read the manual.
I highly recommend "Getting Started (Vol 1)" and - once you are familiar with Igor - "Programming (Vol IV)".

HJ