Try @printf or @sprintf:

julia> a = @sprintf("%0.3f", .8454)
"0.845"


julia> a = @sprintf("%0.3f", 1.8454)
"1.845"




On Tuesday, August 11, 2015 at 1:21:30 PM UTC-7, [email protected] wrote:
>
> How to write zero before decimal in julia, when output result to file? As 
> example, I use writedlm to output "0.324565", and I get ".324565". Is there 
> any package that can use output format like in c++ or Fortran?
>

Reply via email to