TIP: Click on subject to list as thread! ANSI
echo: science
to: ALL
from: MIKE ROSS
date: 2004-08-10 22:32:48
subject: Pythagorean triples

Path: number1.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!zen.net.uk!dedekind.zen.co.uk!newsfeed.tpinternet.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: Tue, 10 Aug 04 22:32:48 +0200
Subject: Pythagorean triples
Message-ID: 
References: 
Organization: Juxtaposition BBS, Telnet:juxtaposition.dynip.com
 111
 300
Lines: 31
Xref: number1.nntp.dca.giganews.com fido.science:296

"DAVID WILLIAMS" bravely wrote to "JASEN BETTS" (10 Aug 04  09:08:16)
 --- on the heady topic of "Pythagorean triples"

 -> the floating point value "timer" is accurate to about 1/18 of a second

 -> at the start:  T! = timer

 -> at the end:    print  "elapssed:"; timer - T! ;"seconds"
 DW>
 DW> That's how I do it - except that I don't write "elapssed"!

Of course the pitfall is if the program is used up around the midnight
hour... then it all comes tumbling down!  (Sounds like a motown lyric?)

Test for mightnight rollover using number of seconds in a day 86400.

     SUB Delay (t%)

        StopTime& = TIMER + t%
        DO
           IF LEN(INKEY$) THEN EXIT DO
        LOOP UNTIL (StopTime& - TIMER) MOD 86400 <= 0

     END SUB

Another foolproof method is to just keep track when TIMER changes and
increment our own counter.

 M*i*k*e

... Entropy isn't what it used to be.

SOURCE: echoes via archive.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.