×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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

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

(OP)
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

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

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

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

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

Regards

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

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources