[Getdp] Bug in Printf ?

Olivier Castany castany at quatramaran.ens.fr
Wed Dec 20 11:48:35 CET 2006


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

Have a nice day,

-- 
Olivier, who could have done it himself if he had some experience in C 
programming... but it's not the case.



More information about the getdp mailing list