From: Hans-Bernhard B. <br...@ph...> - 2004-07-18 21:46:09
|
On Sun, 18 Jul 2004, Ethan A Merritt wrote: > On Sunday 18 July 2004 07:03 am, Hans-Bernhard Broeker wrote: > > > > > > 1) gprintf("format",mantissa,exponent) > > > Is that the form it should take? > > > > No. It should be gprintf("format", number). The crucial difference > > is that C's sprintf() supports multiple % formats and uses up exactly > > one argument per format specifier, whereas gprintf() only ever has one > > argument, but may use more than one format specifier with it. > > Let me see if I understand this... > > The user would type, for example > set label gprintf("format",var) > and internally this would be converted into a call to the existing > function of the form > gprintf( (char *)temp, sizeof(temp), > (char *)format, > (double)current_radix, > (double)var); > followed by copying temp into the appropriate place, in this case > the label structure. > > From the user's point of view (and the parser's), gprintf always has > exactly two parameters: (char *)format and (double)var. Yes. It may be useful / necessary to allow for the logarithm base (current_radix), too, but we can worry about that later. -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |