delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/17/21:17:56

From: mert0407 AT sable DOT ox DOT ac DOT uk (George Foot)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Thanks, HELP! mouse problems
Date: 17 May 1997 21:58:22 GMT
Organization: Oxford University, England
Lines: 15
Message-ID: <5ll9lu$9va@news.ox.ac.uk>
References: <01bc6257$9ed88cc0$LocalHost AT stachowiak> <337E0EE4 DOT 1DB7F3F2 AT cornell DOT edu>
NNTP-Posting-Host: sable.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

A. Sinan Unur (asu1 AT cornell DOT edu) wrote:
: Helix wrote:
: > 
: >   if ((mouse_b & 1) & (mouse_x > fx) & (mouse_x < lx) & (mouse_y > fy) &
: > (mouse_y < ly))

: no. the problem is that you are using bitwise and rather than logical
: and. replace the &'s with &&'s.

...but not all of them! As I noted in my other post, (mouse_b & 1) is
correct but the others ought to be changed.

-- 
George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Merton College, Oxford

- Raw text -


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