<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Fri, 11 Feb 2005 19:08:20 +0800
From   : "Tom Drage" <drage@...>
Subject: Re: programming tips

10 REM Magic Number
20 REM by Thomas Drage, modified by Darren Izzard
30 REPEAT
40 MODE 4
50 PRINT TAB(8,1)"Welcome to Magic Number!"
60 COLOUR 2:PRINT TAB(5,2)"by Thomas Drage/Darren Izzard"
70 B%=RND(20)
80 REPEAT
90 COLOUR 3:INPUT'"Enter your guess:"G%
100 IF G%=B% THEN PROCcorrect
110 IF G%>B% THEN COLOUR 2:PRINT "Too big! Try again."
120 IF G%<B% THEN COLOUR 2:PRINT "Too small! Try again."
130 UNTIL G%=B% OR G%=0
140 IF G%=0 THEN PRINT'"Goodbye!":END
150 PRINT'"Do you want to try again? ";
160 REPEAT
170 A$=GET$
180 UNTIL INSTR("YyNn",A$)<>0
190 PRINT A$
200 UNTIL A$="N" OR A$="n"
210 PRINT'"Goodbye!"
220 END
230 DEF PROCcorrect
240 CLS
250 GCOL 0,1
260 MOVE 200,300
270 DRAW 350,250
280 DRAW 460,575
290 PRINT TAB(16,25)"Correct!"
300 ENDPROC

Hi, just a few things. Could you please explain this PROC idea, line 170
and
line 180.

Sorry about this, but I'm trying to learn so I'm not too good.





Tom Drage
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0www.draget.net 


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.6 - Release Date: 2/7/2005
 
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>