Path: number1.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!zen.net.uk!dedekind.zen.co.uk!newsfeed.esat.net!news2.telebyte.nl!news.icp.pl!newsfeed.atman.pl!news.intercom.pl!f124.n480!f127.n480!f112.n480!f200.n2432!f605.n774!f500.n123!f2000.n106!f45.n396!f1.n379!f133.n167!not-for-mail
Newsgroups: fido.science
Distribution: fido
From: MIKE ROSS
Date: Fri, 13 Aug 04 12:54:02 +0200
Subject: Pythagorean triples
Message-ID:
References:
Organization: Juxtaposition BBS, Telnet:juxtaposition.dynip.com
111
300
Lines: 30
Xref: number1.nntp.dca.giganews.com fido.science:312
"DAVID WILLIAMS" bravely wrote to "JASEN BETTS" (13 Aug 04 09:13:42)
--- on the heady topic of "Pythagorean triples"
-> sub delay (s)
-> for x=1 to s*18.6
-> t=timer
-> while t=timer
-> if inkey$ "" goto done
-> wend
-> next
-> done:
-> end sub
-> Jasen
DW>
DW> Isn't "s*18.6" arithmetic?
DW>
DW> More seriously - in some BASICs - you make it jump out of the loop if
DW> a key is pressed, without cleaning the FOR... information off the
DW> stack. Some BASICs will sort this out for you, but others won't, and
DW> will lead you into all kinds of tangles later. It would be better to
DW> use EXIT FOR than the GOTO.
DW>
DW> My $0.02 worth.
The loop EXIT as you point out is an evolution and so is using DO/LOOP.
M*i*k*e
... Stack corrupt! News at &H2A.....
|