Quick question about "print EXPR"

Peter Barada peter@the-baradas.com
Wed Dec 22 20:40:00 GMT 2004


>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



More information about the Gdb mailing list