removing quotes



On 10/13/08, eric.reyssat at math.unicaen.fr <eric.reyssat at math.unicaen.fr> wrote:

> Hi, I want to print the list
>
>  L:[[1e-5,2e-5],[3e-5,4e-5]];
>
>  as a string with parentheses instead of brackets, decimal rather than
>  scientific notation, and no quotes around the numbers. Like this :
>
>  (0.00001,0.00002),(0.00003,0.00004)

I'm guessing that you only need to handle lists exactly like L,
if so, I think this should work:

S : printf (false, "((~f, ~f), (~f, ~f))~%", L[1][1], L[1][2],
L[2][1], L[2][2]);
 => ((0.00001, 0.00002), (0.00003, 0.00004))

or printf(true, ...) which prints the string to the console, or printf(s, ...)
which prints the string to stream s (created by opena or openw).

HTH

Robert Dodier