2016-12-05 22:15:40 +01:00
|
|
|
identification division.
|
|
|
|
|
program-id. altering.
|
2013-10-27 22:24:23 +00:00
|
|
|
|
2016-12-05 22:15:40 +01:00
|
|
|
procedure division.
|
|
|
|
|
main section.
|
2013-10-27 22:24:23 +00:00
|
|
|
|
2016-12-05 22:15:40 +01:00
|
|
|
*> And now for some altering.
|
|
|
|
|
contrived.
|
|
|
|
|
ALTER story TO PROCEED TO beginning
|
|
|
|
|
GO TO story
|
|
|
|
|
.
|
2013-10-27 22:24:23 +00:00
|
|
|
|
2016-12-05 22:15:40 +01:00
|
|
|
*> Jump to a part of the story
|
|
|
|
|
story.
|
|
|
|
|
GO.
|
|
|
|
|
.
|
2013-10-27 22:24:23 +00:00
|
|
|
|
2016-12-05 22:15:40 +01:00
|
|
|
*> the first part
|
|
|
|
|
beginning.
|
|
|
|
|
ALTER story TO PROCEED to middle
|
|
|
|
|
DISPLAY "This is the start of a changing story"
|
|
|
|
|
GO TO story
|
|
|
|
|
.
|
2013-10-27 22:24:23 +00:00
|
|
|
|
2016-12-05 22:15:40 +01:00
|
|
|
*> the middle bit
|
|
|
|
|
middle.
|
|
|
|
|
ALTER story TO PROCEED to ending
|
|
|
|
|
DISPLAY "The story progresses"
|
|
|
|
|
GO TO story
|
|
|
|
|
.
|
|
|
|
|
|
|
|
|
|
*> the climatic finish
|
|
|
|
|
ending.
|
|
|
|
|
DISPLAY "The story ends, happily ever after"
|
|
|
|
|
.
|
|
|
|
|
|
|
|
|
|
*> fall through to the exit
|
|
|
|
|
exit program.
|