AnsweredAssumed Answered

Re_VRF_Loop_Problems

Question asked by VRFuser on Mar 29, 1997
send q Re_VRF_Loop_Problems ww grea@omnipoint.com vrf

from: Greg Goebel / HP-MXD
      gvg@lvld.hp.com / 970-679-3030 / FAX 970-679-5971
to:   VRf-Greg Rea
date: Sunday, 30 March 1997 1033 MST

>
> Hi All,
>
>  Having a problem with loops (For, Until-Break...).  I have several test
> situations where I'm using a loop to step through the procedure.  I also have a
> toggle at the top of each pass through the loop to see if the user has opted to
> abort the test.  Several times, now, the loop will make one pass and stop. 
> When I turn on the animation, I can see the program flow get to the "Next"
> object and then it stops.  The "For" object remains highlighted, but nothing
> happens.
>
> So far, I have not been able to determine what causes this.  Sometimes it will
> be when I'm editing the VEE file but it just recently started happening during
> the middle of a test, when nothing has been changed within the VEE file.
>
> I have discovered what fixes the problem, however.  If I replace the loop
> object with the same object (just cut&paste in a new one), the program returns
> to normal operation, at least until it happens again.
>
>   - - Is there a known bug or specific way to use toggles in loop situations?
>
>   - - Are there reserved var names that can't be used such as "quit", "abort"
> ...?
>
> Any suggestions would be helpful.  (running VEE 3.21 on a Dell P166)
>                    
>      +-------+
>      | Start |
>      +-------+         *Toggle gets reset by the start object
>          |
>     +-----------+     +--------+     +-------+     +-------+
>     | For Count |---->| Toggle |---->| A==1? |---->| Break |
>     +-----------+     +--------+     +-------+     +-------+
>          |                 |
>      +-------+        +--------+  
>      | Exit  |        |  Test  |
>      +-------+        +--------+
>                            |
>                       +--------+
>                       |  Next  |
>                       +--------+

Sir:

I'm not too sure what this program is doing ... I would modify it slightly
as:
       +-------+
       | Start |
       +---+---+
           |
        +---------+
        |         |
     +-----+-----+   |
     | For Count +---|-------+
     +-----+-----+   |       |
           |         |   +--------+   +-------+------+     +-------+
       +---+---+     +-->| Toggle +-->| A==1? | then +---->| Break |
       | Exit  |         +--------+   |       | else +--+  +-------+
       +-------+                      +-------+------+  |
                                                    +---+----+  
                                                    |  Test  |
                                                    +---+----+
                                                        |
                                                    +---+----+
                                                    |  Next  |
                                                    +--------+

However, I'm not sure this will work any better, because there is a BIG-TIME
bug in VEE 3.2X relative to loops inside UserFunctions ... if you stop the
loop while it is in the UserFunction, it will tend to lock up.  This is fixed
in VEE 4.0.

If you have more questions, let us know.

[<>] regards -- gvg

Outcomes