Happy Hour - IBM SC34-5764-01 Manual

Cics transaction server for vse/esa
Table of Contents

Advertisement

Programming Style and Techniques
Answer:
/* CON EXEC */
/* Tossing a coin. The machine is lucky, not the user */
do forever
say "Let's play a game! Type 'Heads', 'Tails'",
"or 'Quit' and press ENTER."
pull answer
select
when answer = "HEADS"
then say "Sorry! It was TAILS. Hard luck!"
when answer = "TAILS"
then say "Sorry! It was HEADS. Hard luck!"
when answer = "QUIT"
then exit
otherwise
say "That's not a valid answer. Try again!"
end
say
end

Happy Hour

Here is a chance to have some fun.
This is a very simple arcade game. Type it in and play it with your friends. Later in this chapter, you may
want to improve it.
90
CICS TS for VSE/ESA: REXX Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rexx

Table of Contents