This time we’re playing a slots game, no, not in a casino. That’s gambling! Gambling is bad! We’re programming our own version, well… fixing someone else’s version of slots.
I would like to remind you that I’m not allowed to give the correct solution to part 3 its challenges. I will however guide you a bit through the process and show you what my results are.
REXX Language Syntax
Modify SLOTS REXX code enabling FRUIT.? variable to contain a fruit value
So let’s go back and read what IBM has to say. The scripts starts a do loop at line 20. At line 24, 26 and 28 the VIEW.# variable get sets to a random fruit name value. BUT there seems to be a problem at line 28. This line requires a modification. Once we fix it, we need to execute it again.
Pick the odd one out, fix it and execute. Let me do that.
The third fruit now shows correctly! Nice!
Modify SLOTS REXX code to acknowledge a win
Hmm… there still seems to be an issue when you win a game of slots. The error is caused by line 73, we need to fix that, our intern misspelled something. Damn you Brian! Let’s investigate the issue.
So, this again is a game of spot the odd one out. But there’s only one to compare the other one to. High chance of failure and high chance of success. Love it! Fix line 73 please 😉 Let me fix it and execute it again.
Two hours later I finally won a game. But I don’t really know the correct 5 digit safe box key. Time to review the code! Type end to exit the code.
Review SLOTS REXX code to determine the 5 digit safe deposit box key
Time to get our minds dirty. We must read the code in order to win this thing!
I know what to do. Time to get the calculator. I got the number, do you? If you’re desperate, take a look at line 81 😉
Do like the screenshot above and let’s see if we get the right output.
View p3.output member #02 for winnings deposited
I have censored the number, but my winnings are deposited!
Did you win?
Are you also a millionaire? I am! Time to buy that mainframe I always wanted, IBM, expect a call soon!