From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5864 invoked by alias); 22 Dec 2004 20:25:53 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 5230 invoked from network); 22 Dec 2004 20:25:45 -0000 Received: from unknown (HELO web51002.mail.yahoo.com) (206.190.38.133) by sourceware.org with SMTP; 22 Dec 2004 20:25:45 -0000 Received: (qmail 64089 invoked by uid 60001); 22 Dec 2004 20:25:44 -0000 Message-ID: <20041222202544.64087.qmail@web51002.mail.yahoo.com> Received: from [208.251.134.130] by web51002.mail.yahoo.com via HTTP; Wed, 22 Dec 2004 12:25:44 PST Date: Wed, 22 Dec 2004 20:25:00 -0000 From: Brian Desany Subject: Quick question about "print EXPR" To: gdb@sources.redhat.com In-Reply-To: <1103746608.31531.ezmlm@sources.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-12/txt/msg00111.txt.bz2 I read in the docs that "print EXPR" should work with function calls. Why is it that no matter what argument I pass to "print floor(234.567)", I always get an answer of "1"? ... 7 yada = 2.5; (gdb) n 8 haha = floor(yada); (gdb) 9 printf("%0.1f %0.1f\n",yada, haha); (gdb) p yada $1 = 2.5 (gdb) p haha $2 = 2 (gdb) p floor(yada) $3 = 1 (gdb) l 4 int main(int argc, char *argv[]) { 5 double yada; 6 double haha; 7 yada = 2.5; 8 haha = floor(yada); 9 printf("%0.1f %0.1f\n",yada, haha); 10 return 0; 11 } ... Thanks- -Brian. __________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail