From: Thomas Demmer Newsgroups: comp.os.msdos.djgpp Subject: Re: ctrl-c handling question Date: Wed, 28 Jan 1998 17:10:31 +0100 Organization: Lehrstuhl fuer Stroemungsmechanik Lines: 41 Message-ID: <34CF5877.2DDBA95@LSTM.Ruhr-UNI-Bochum.De> References: <01bd2bf2$0f2058a0$542c5c8b AT aptiva> <34CF4E8F DOT 95E933D6 AT LSTM DOT Ruhr-UNI-Bochum DOT De> <34CFA7EE DOT 31C38A32 AT 127 DOT 0 DOT 0 DOT 1> NNTP-Posting-Host: bvb.lstm.ruhr-uni-bochum.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Fernando wrote: > > hmmm, interesting, but now, what happens with this small program: > > #define TRUE 1 > int main(void){ > int i = 1 ; > while (i == TRUE); > } > > and with this variant: > #define TRUE (1 == 1) > int main(void){ > while (TRUE) ; > } > > Are they accesing memory ? I think the first one is doing it but I am > not sure about the second one. If I am right, the second one is equal to while(1), because the compiler can evaluate it a compile time, so you shouldn't be able to ^C. The second one. Well I guess it depends on the optimisation level. Why not not just go and try? Or did you and just want to prove me wrong ;-) Ciao Tom ************************************************************* * Thomas Demmer * * Lehrstuhl fuer Stroemungsmechanik * * Ruhr-Uni-Bochum * * Universitaetsstr. 150 * * D-44780 Bochum * * Tel: +49 234 700 6434 * * Fax: +49 234 709 4162 * * http://www.lstm.ruhr-uni-bochum.de/~demmer * *************************************************************