Another question about flow control... Any help?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Another question about flow control... Any help?

    Hello everybody... Here's my question and I hope my document is clear as to what I am asking. I need some type of stop in my program after certain segments are done. I've basically made 3 programs into one and I just need to seperate them. Am I on the right path here? I need the program to finish after each segment without continuing. Thanks in advance for any help.

    Mike
    Attached Files
    Last edited by Mike Johnston; 04-18-2007, 10:58 AM. Reason: File Attachment

  • #2
    I haven't done a whole lot of that, but it appears to me that you are on the right path...
    sigpic
    Xcel 15-20-10 - PFXcel 7-6-5 - Merlin 11-11-7 - Romer Absolute 7525SI
    PCDMIS 2012
    Windows Office XP

    Comment


    • #3
      You could add a forth label at the end of each program to point to end of program
      sigpic
      if you had soap on a rope it would be tied to yer ankle

      Comment


      • #4
        Program/End

        Your logic to get into that section of program is fine, but you (currently) show no way to get out once it is done. The way I see it now, it will continue through all 3 sections.

        You should only need a PROGRAM/END after each of the 3 sections. When the commands reach there it will stop without going into the next section.

        The alternative to that is to place another GOTO after each, which directs the flow of the program to a 4th label after the 3rd section, where the program ends naturally.

        Comment


        • #5
          Hey.... those are some pretty good ideas. Thanks a bunch. I think that with that information I'll be able to finally get this to work. Thanks guys!

          Mike

          Comment


          • #6
            Yet another option

            C1 =COMMENT/INPUT,NO,'enter a value'
            IF/C1.INPUT==1
            COMMENT/OPER,NO,it was 1
            END_IF/
            IF/C1.INPUT==2
            COMMENT/OPER,NO,it was 2
            END_IF/
            IF/C1.INPUT==3
            COMMENT/OPER,NO,it was 3
            END_IF/

            surround each section of program with If and End/If

            Comment


            • #7
              Originally posted by T Miller View Post
              You could add a forth label at the end of each program to point to end of program
              I never thought about that. I guess I probably should be adding something similar to my programs especially since I am beginning to get into doing more CC Testing (once a year)...
              sigpic
              Xcel 15-20-10 - PFXcel 7-6-5 - Merlin 11-11-7 - Romer Absolute 7525SI
              PCDMIS 2012
              Windows Office XP

              Comment

              Related Topics

              Collapse

              Working...
              X