Path: chuka.playstation.co.uk!news From: Craig Graham Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: ResetGraph(?) Date: Thu, 12 Nov 1998 19:47:54 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 34 Message-ID: <364B3B6A.D03FD692@hinge.mistral.co.uk> References: <72fcu3$5bg3@chuka.playstation.co.uk> NNTP-Posting-Host: d1-s4-36-telehouse.mistral.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.05 [en] (Win95; I) Radouan Khechane wrote: > Also while I'm asking, what's the difference between these two defines? > > #define NUMBER 1 > and > #define NUMBER (1) > > Is the second one, something to do with ansi c standard? In that example nothing, but in general bracketing defines is a good thingas it avoids problems with operator precedence doing unexpected things to your code. eg. // define T1 & T2 to both equal 3 #define T1 1+2 #define T2 (1+2) a=5+T1*3; // a=5+1+2*3=12 b=5+T2*3; // a=5+(1+2)*3=14; a & b will not be equal. This is because * has a higher precedance than +. > Rad. Hope that helps.... Craig.