Path: utzoo!attcan!uunet!yale!chen-dahe From: chen-dahe@CS.Yale.EDU (Dahe Chen) Newsgroups: comp.lang.c Subject: cast question. Message-ID: <48699@yale-celray.yale.UUCP> Date: 26 Jan 89 00:18:20 GMT Sender: root@yale.UUCP Reply-To: chen-dahe@CS.Yale.EDU (Dahe Chen) Distribution: na Organization: Yale University Computer Science Dept, New Haven CT 06520-2158 Lines: 29 It may be a stupid question but I am perplexed by the code like the following: ... doubel A , B ; ... if( (int) A <= (int) B ) { statement1 ; } else { statement2 ; } ... I am having the case that the integral parts of A and B are equal and the control goes to statement2. My question is that am I casting A and B to integers properly. If not, what is the correct way. Please e-mail to me. Thanx in advance. ------- Dahe Chen internet: dchen@twolf.ce.yale.edu ( @venus.ycc.yale.edu ) chen-dahe@cs.yale.edu bitnet: dchen@yalevms