×
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

how to use *DOWHILE command!

how to use *DOWHILE command!

how to use *DOWHILE command!

(OP)
Hi everybody,
I would like to know how the *DOWHILE command works, and what is the argument "par"?
Thank you.
Lyes

RE: how to use *DOWHILE command!

*DOWHILE repeats a loop until a certain condition either is or is not meant.  This is the same principal as a "while" type of DO loop in Fortran.  You need to have a conditional statement which sets a parameter value depending on whether a condition is or is not meant somewhere in your loop.  This is typically done with an *IF construct.  Whenever the parameter (the 'par' argument) equals zero the loop exits.  *DOWHILE is used when you don't know the number of times a loop should be executed, rather you know it should be exectued until a condition is true or not.  Take a look on the web for some Fortran examples using a WHILE type of DO construct if you're still unclear.

-Brian

RE: how to use *DOWHILE command!

(OP)
Hi Brain,
I'm familiar with the WHILE loop in Fortran, but my problem is that I don't know how tu use the 'par' argument. In Fortran, we could write:
WHILE,A,LT,B,THEN
....
ENDWHILE
But with *DOWHILE in Ansys there is just the 'par' argument! why the loop exit when arg is equal to zero only? I don't understand the role of this parameter!
Lyes.  

RE: how to use *DOWHILE command!

Hi,
'par' is a boolean control parameter. 0 = "False", so the loop ends. Any other number is equivalent to 1 = "True", so the loop goes on.
It's the same concept as, for example, in VB when you write something like
... if not my_parameter then ...

Regards

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