Printf interface

I think it would be great to have printf in freefem. Syntax is shorter (and I believe easier to read) and better fits to the overall style of the freefem code.

Hi, doesn’t ofstream do the job?

real a1=1.0,a2=2.0;
ofstream output(“file.dat”);
output << a1 << " "
<< a2 << " "
<<endl;

You can try to do this!

Yes does the job. But as I mentioned printf is more concise and convenient than long c++ style. Compare your minimal example with something like printf(output,"%f %f\n",a1,a2);

Well, if it is not very complicated I can try!
Can you point me to an example (the simplest) of interfacing with some C code in freefem?
Merci

I’m curious as well to see how to define variadic functions in FreeFEM DSL.