Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!ukma!rutgers!att!mtuxo!tas From: tas@mtuxo.att.com (XMPC2-T.SKROBALA) Newsgroups: comp.sys.amiga Subject: Re: Manx and floats Summary: can use "e printf" Message-ID: <4525@mtuxo.att.com> Date: 21 Apr 89 16:37:45 GMT References: <13477@louie.udel.EDU> Organization: AT&T, Middletown NJ Lines: 19 In article <13477@louie.udel.EDU>, mermelstein@inrs-telecom.uquebec.ca (Lois Mermelstein) writes: > > However, if you recompile and link, adding the options to generate info > for SDB, and run the program with SDB, you'll discover that SDB won't > be able to tell you the correct values of any floating point (float OR > double) variables, structure elements, etc. (You, instead, get things > like [lotsa digits]e-314 when the value should be 1.0.) I, too have had problems getting SDB to print floating point values. It may be possible to get it to work with one of the other floating-point models, but, in any case, there is a workaround that you may be able to use. Simply give sdb the command e printf( "%f", variable ) Assuming that your program has printf() linked in, you can use that command to invoke a call to printf, which will send its output to the standard output. If the standard output is your console window, you just have to take a peek at that screen to see your variable's value. Tom Skrobala AT&T Bell Laboratories att!mtuxo!tas