Skip to main content

[archive] General ACCEPT Question

  • March 12, 2007
  • 3 replies
  • 0 views

[Migrated content. Thread originally posted on 12 March 2007]

Hello,
In a paragraph such as the following is there any way to force an end to the Perform loop without pushing the exit button on the screen?
Acu-WaitScrn-Choice-Proc.
PERFORM UNTIL Exit-Pushed
ACCEPT WaitScrn
ON EXCEPTION PERFORM Acu-WaitScrn-Evaluate-Func
END-ACCEPT
END-PERFORM
DESTROY WaitScrn-Handle
INITIALIZE Key-Status

Thanks

3 replies

[Migrated content. Thread originally posted on 12 March 2007]

Hello,
In a paragraph such as the following is there any way to force an end to the Perform loop without pushing the exit button on the screen?
Acu-WaitScrn-Choice-Proc.
PERFORM UNTIL Exit-Pushed
ACCEPT WaitScrn
ON EXCEPTION PERFORM Acu-WaitScrn-Evaluate-Func
END-ACCEPT
END-PERFORM
DESTROY WaitScrn-Handle
INITIALIZE Key-Status

Thanks
There are many ways to have your exception routine fired off

EXCEPTION PERFORM Acu-WaitScrn-Evaluate-Func

Menus (exception values) and hot-keys can raise an exception without the user pressing the push button.

[Migrated content. Thread originally posted on 12 March 2007]

Hello,
In a paragraph such as the following is there any way to force an end to the Perform loop without pushing the exit button on the screen?
Acu-WaitScrn-Choice-Proc.
PERFORM UNTIL Exit-Pushed
ACCEPT WaitScrn
ON EXCEPTION PERFORM Acu-WaitScrn-Evaluate-Func
END-ACCEPT
END-PERFORM
DESTROY WaitScrn-Handle
INITIALIZE Key-Status

Thanks
Using the BEFORE TIME is an easy way of making the accept terminate with a condition you can test to terminate the perform.

[Migrated content. Thread originally posted on 12 March 2007]

Hello,
In a paragraph such as the following is there any way to force an end to the Perform loop without pushing the exit button on the screen?
Acu-WaitScrn-Choice-Proc.
PERFORM UNTIL Exit-Pushed
ACCEPT WaitScrn
ON EXCEPTION PERFORM Acu-WaitScrn-Evaluate-Func
END-ACCEPT
END-PERFORM
DESTROY WaitScrn-Handle
INITIALIZE Key-Status

Thanks
Hello,
In a paragraph such as the following is there any way to force an end to the Perform loop without pushing the exit button on the screen?
Acu-WaitScrn-Choice-Proc.
PERFORM UNTIL Exit-Pushed
ACCEPT WaitScrn
ON EXCEPTION PERFORM Acu-WaitScrn-Evaluate-Func
END-ACCEPT
END-PERFORM
DESTROY WaitScrn-Handle
INITIALIZE Key-Status

Thanks


I've done this

PERFORM UNTIL Exit-Pushed
Accept WaitScrn BEFORE TIME 1
ON EXCEPTION PERFORM EXCEPTION-ROUTINE
END-ACCEPT
IF NOT Exit-Pushed
perform check-for-condition
IF Condition-Met
SET Exit-Pushed TO TRUE
END-IF
END-IF
END-PERFORM.