Jumping to end of process in PlusCal?

72 views
Skip to first unread message

Elliott Jin

unread,
Jul 29, 2016, 12:14:27 PM7/29/16
to tlaplus
Hello,

Is there a canonical way to indicate "jump to the end of the process" in PlusCal?  I've just been handling this by adding an extra label at the end:

writer_done: 
skip;
 
and then using goto as follows:

if (should_abort) {
goto writer_done;
} 
 
But I was wondering if there was an existing keyword / shorter way to handle this.

Thanks!
-Elliott

Leslie Lamport

unread,
Jul 29, 2016, 2:58:31 PM7/29/16
to tlaplus
There is an implicit label "Done" at the end of the process, so you can write

   goto Done

Leslie

Elliott Jin

unread,
Aug 6, 2016, 11:27:51 PM8/6/16
to tlaplus
Thanks!  This approach is much nicer.
Reply all
Reply to author
Forward
0 new messages