On 2004-08-24, ziller <zi****@gmail.com> wrote:
I meant to say how does it translate the *. Python lets you use a
variable to specify the length of precision.
int f_length = 5;
float fl = 3.5
printf("%.*f", f_length, fl);
doesn't compile.
Of course not. It's not valid C. The following compiles just
fine:
#include <stdio.h>
int f_length = 5;
float fl = 3.5;
void foo(void)
{
printf("%.*f",f_length, fl);
}
Not sure why you're asking C questions in c.l.p...
--
Grant Edwards grante Yow! Excuse me, but didn't
at I tell you there's NO HOPE
visi.com for the survival of OFFSET
PRINTING?