TIP: Click on subject to list as thread! ANSI
echo: quik_bas
to: BILL WHITE
from: DAVID WILLIAMS
date: 1998-04-04 09:29:00
subject: Old Folks

-> IF variable$(8)  "b" AND variable$(12)  "b" THEN
->
-> It didn't execute properly - I needed OR, not AND.
*Extreme* old-timers may remember something called "Old Punter
Protocol", which was a system for transferring files by modem between
now-ancient Commodore computers such as the PET. It was used back in the
very early 1980s. It worked by transmitting a couple of hundred bytes of
the file as a block, and calculating a two-byte checksum at each end.
After the block was transmitted, the computers compared their checksums,
and if they disagreed the block was sent again.
But it was found that a lot of errors managed to slip past this checksum
scheme. Eventually I discovered the cause of the problem. The author had
made exactly the same mistake as you. When doing the double comparison,
to make sure both bytes of the checksums agreed, he had written AND
instead of OR. The result was that a block would get re-sent only if
*both* checksum bytes were wrong. If only one was wrong, which would
usually be the case if an error occurred, the error would not be
detected.
It was an easy slip to make, and a hard one to find!
                            dow
--- PCBoard (R) v15.3 (OS/2) 5
---------------
* Origin: FidoNet: CAP/CANADA Support BBS : 416 287-0234 (1:250/710)

SOURCE: echomail via exec-pc

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™.