Home > Community > Forums > PCB SKILL > Early termination of program

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Early termination of program 

Last post Tue, Jul 25 2006 8:48 PM by archive. 2 replies.
Started by archive 25 Jul 2006 08:48 PM. Topic has 2 replies and 1488 views
Page 1 of 1 (3 items)
Sort Posts:
  • Tue, Jul 25 2006 8:48 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    Early termination of program Reply

    Hi,

    Need a simple answer.  How do I terminate and exit a skill program early if a condition is not met?


    Regards,
    Stella


    Originally posted in cdnusers.org by ystella
    • Post Points: 0
  • Thu, Jul 27 2006 1:41 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Early termination of program Reply

    Hi Stella,

    It may be too simple but you can use the return command within a prog loop.
    eg.

    defun( test (a b)
       prog(()
          unless(a == b return(1))
          .
          .
          return(0)
      )
    )

    Cheers, Dave


    Originally posted in cdnusers.org by Dave Elder
    • Post Points: 0
  • Thu, Jul 27 2006 8:14 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Early termination of program Reply

    Hi Dave,

    Thanks. I was trying that out yesterday but got the syntax wrong so it did not work. Solved now. Thanks for the help.


    Regards,
    Stella


    Originally posted in cdnusers.org by ystella
    • Post Points: 0
Page 1 of 1 (3 items)
Sort Posts:
Started by archive at 25 Jul 2006 08:48 PM. Topic has 2 replies.