Magic 8-ball: Difference between revisions
Content added Content deleted
m (→{{header|ooRexx}}: appen Free Pascal version) |
(Added Chipmunk Basic, MSX Basic and Quite BASIC) |
||
Line 501: | Line 501: | ||
end while |
end while |
||
end</syntaxhighlight> |
end</syntaxhighlight> |
||
==={{header|Chipmunk Basic}}=== |
|||
{{works with|Chipmunk Basic|3.6.4}} |
|||
{{trans|Commodore BASIC}} |
|||
<syntaxhighlight lang="qbasic">100 cls |
|||
110 data "It is certain.","It is decidedly so." |
|||
120 data "Without a doubt.","Yes - definitely." |
|||
130 data "You may rely on it.","As I see it, yes." |
|||
140 data "Most likely.","Outlook good." |
|||
150 data "Yes.","Signs point to yes." |
|||
160 data "Reply hazy, try again.","Ask again later." |
|||
170 data "Better not tell you now.","Cannot predict now." |
|||
180 data "Concentrate and ask again.","Don't count on it." |
|||
190 data "My reply is no.","My sources say no." |
|||
200 data "Outlook not so good.","Very doubtful." |
|||
210 dim m8ball$(20) |
|||
220 for i = 0 to 19 |
|||
230 read m8ball$(i) |
|||
240 next i |
|||
250 randomize timer |
|||
260 input "What would you like to know? ",q$ |
|||
270 print m8ball$(int(rnd(20))) |
|||
280 end</syntaxhighlight> |
|||
==={{header|IS-BASIC}}=== |
==={{header|IS-BASIC}}=== |
||
Line 523: | Line 546: | ||
280 DATA Don't count on it.,My reply is no.,My sources say no. |
280 DATA Don't count on it.,My reply is no.,My sources say no. |
||
290 DATA Outlook not so good.,Very doubtful.</syntaxhighlight> |
290 DATA Outlook not so good.,Very doubtful.</syntaxhighlight> |
||
==={{header|MSX Basic}}=== |
|||
{{works with|MSX BASIC|any}} |
|||
{{trans|Commodore BASIC}} |
|||
<syntaxhighlight lang="qbasic">100 CLS |
|||
110 DATA "It is certain.","It is decidedly so." |
|||
120 DATA "Without a doubt.","Yes - definitely." |
|||
130 DATA "You may rely on it.","As I see it, yes." |
|||
140 DATA "Most likely.","Outlook good." |
|||
150 DATA "Yes.","Signs point to yes." |
|||
160 DATA "Reply hazy, try again.","Ask again later." |
|||
170 DATA "Better not tell you now.","Cannot predict now." |
|||
180 DATA "Concentrate and ask again.","Don't count on it." |
|||
190 DATA "My reply is no.","My sources say no." |
|||
200 DATA "Outlook not so good.","Very doubtful." |
|||
210 DIM m$(20) |
|||
220 FOR i = 0 TO 19 |
|||
230 READ m$(i) |
|||
240 NEXT i |
|||
260 INPUT "What would you like to know? "; q$ |
|||
270 PRINT m$(INT(RND(20))) |
|||
280 END</syntaxhighlight> |
|||
==={{header|QBasic}}=== |
==={{header|QBasic}}=== |
||
Line 550: | Line 595: | ||
DATA "My sources say no.","Outlook not so good." |
DATA "My sources say no.","Outlook not so good." |
||
DATA "Very doubtful."</syntaxhighlight> |
DATA "Very doubtful."</syntaxhighlight> |
||
==={{header|Quite BASIC}}=== |
|||
The [[#MSX Basic|MSX Basic]] solution works without any changes. |
|||
==={{header|True BASIC}}=== |
==={{header|True BASIC}}=== |