This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Quick question about "print EXPR"


>Why is it that no matter what argument I pass to "print floor(234.567)", I always get an answer of
>"1"?

Did you include <math.h> in your program?  If not you don't have a
prototype for floor that indicates it takes a double and returns a
double...

-- 
Peter Barada
peter@the-baradas.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]