www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/02/19:59:04

From: j DOT aldrich6 AT genie DOT com
Message-Id: <199608022354.AA028080055@relay1.geis.com>
Date: Fri, 2 Aug 96 23:29:00 UTC 0000
To: sengan DOT short AT durham DOT ac DOT uk
Cc: djgpp AT delorie DOT com, landmark AT vcn DOT bc DOT ca
Mime-Version: 1.0
Subject: Re: Compile Errors

Reply to message 0139193    from SENGAN.SHORT@ on 08/02/96  6:18AM


>>             putpixel (loop1, loop2, rand() % 0xff );
>
>Did you not mean % 0x100 ?
>
>Can't you even correct things properly ! (joke ;-) )

Oops.

I guess even my vaunted proofreader's mind can make a booboo once
in a while.  :)  Actually, what happened was that I confused masking the
bits with & and taking the mod with %.  So the line would have been
correct if I'd written:

             putpixel (loop1, loop2, rand() & 0xff );

or

             putpixel (loop1, loop2, rand() % 0x100 );

Sorry for the mistake.  :P

John

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019