Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

*DO loop index same as outer index AQ...?

Status
Not open for further replies.

SKJoe

Mechanical
Jun 6, 2005
78
0
0
SK
Hi,

I am doing a parametric study via *do-loops. In process of saving results to arrays obtaining following error message : *DO loop index same as outer index AQ. It is related with *DO,AQ,1,3...
The first crazy thing is that in code written above I use similar Do-loop construction and it works.
The second crazy thing is that I can remember that I have already had this problem some time ago and resolved it, but I can not remember which way...

Anyone can help ?

Regards,
Lubo
 
Replies continue below

Recommended for you

Hello,

The problem is, that you are using the same loop variable in two different loops or something similar.

Change the variable of the do loop index. For example from i to ii.

Regards,
Alex

 
Hi,
in addition to Alex: you are using the same index in two different NIDIFICATED loops (one inside the other).

Regards
 
Hi,

the problem was that I wrote two slightly different do-loops as follows :
*do,aq,1,5
...
*enddo

*do,aq,1,5
*do,bq,1,3
...
*enddo
*enddo
in the first do-loop I forgot to write *enddo so this loop was executed only one time not five times. After I added *enddo the problem was solved. I am using the same do-loop index in subsequent do-loop quite often without problems...
Thank you mihaiupb and cbrn anyway.

Regards,
Lubo
 
Status
Not open for further replies.
Back
Top