3. Programming Frames : How You Can Invoke Frames : Differences Among the Frame-invoking Statements : How You Can Pass Control While Closing the Parent: Gotoframe Statement
 
Share this page                  
How You Can Pass Control While Closing the Parent: Gotoframe Statement
The gotoframe statement closes the calling frame and opens a new frame that replaces the calling frame. OpenROAD transfers control to the called frame, and the user cannot return to the calling frame.
Because the gotoframe statement closes the calling frame and therefore does not return to it, it has no return value. You should use this statement when you do not want users to return to the calling frame; for example, when you want an interim frame that the user fills out between using one frame and another.
Because the frame invoked by the gotoframe statement replaces the calling frame, the parent frame of the calling frame now has a new child frame. The following is an illustration of this concept:
OpenROAD automatically terminates the child frame when the parent frame terminates. Therefore, if the user closes the calling frame's parent frame, OpenROAD automatically terminates the new child frame.