This article applies to:
A recursive loop is a Procedure, sub-routine, or function that calls itself. When this occurs, the program or experiment enters a loop that never ends (e.g. Proc1 calls Proc1, which calls Proc1, etc.). In E-Prime, it is possible to create a recursive loop by having a List object call a Procedure on which the List exists (i.e. a List object is calling a Procedure that calls the List again). So, for example, if a BlockProc runs the TrialList, and the TrialList calls the BlockProc, this results in a recursive loop since the TrialList and BlockProc run infinitely. In this case, E-Prime creates a "Recursive loop" object within the Structure view:
To avoid this problem, ensure that no List objects call a Procedure on which the List itself exists and that no InLine script calls a Procedure on which the InLine script exists.
NOTE: In the latter case described above (i.e., script calling a Procedure that calls the script again), E-Prime does NOT display a "Recursive loop" object in the Structure view. However, an error occurs at runtime.