Hello everyone!
I’m currently developing a project which requires reading old text files, Fortran formated arrays. Which means I have huge text files like this:
0.0071435 0.00745535 0.00776577 0.00807047 0.00803566 0.00798893
0.00807762 0.00816631 0.00815916 0.00814819 0.00828075 0.00845718
0.00815868 0.00800419 0.00791979 0.00787973 0.00795364 0.00802708
Using readdlm
makes it a breeze! However, my last line is incomplete, having only 3 columns.
Hence the output of readdlm
is 554×6 Array{Any,2}
and if I set the type to Float64
it errors out since ""
cannot be converted to Float64
.
Wouldn’t it make sense for an optional default value to be specified? Like:
readdlm(source, delim::AbstractChar, T::Type, eol::AbstractChar; default::T, <omitted for brevity>)