[Getdp] Bug in Printf ?

Christophe Geuzaine cgeuzaine at ulg.ac.be
Wed Feb 7 17:06:51 CET 2007


Olivier Castany wrote:
> Hello,
> 
> I want to output data in the gmsh message console.
> 
> With the minimal "test.pro" file following :
> 
> --------------------- Start of file -------------
> epsilon0 = 8.854e-12 ;
> Printf("epsilon0 = %e", epsilon0);
> --------------------- End of file ---------------
> 
> the result I see in the gmsh message console is :
> 
> "GetDP   : epsilon0 = 8.854000e-1"
> 
> She forgot the "2" at the end !!! (a workaround is to add a space : 
> Printf("epsilon0 = %e ", epsilon0); but it's not nice)
> 
> When I run the program in an xterm, the value is correctly printed. 
> However, a trailing "\n" is not understood.
> 
> 
> So I ask if someone(TM) could improve the code so that :
> 
> - the trailing figure is correctly printed in the gmsh message console
> - the trailing "\n" are taken into account
> 


Not sure what to do: it seems to work just fine on both Mac and Windows 
over here (using the "rxvt" terminal on Windows).






> Have a nice day,
> 


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine