Hi Chapel Developers -
Brad and I were discussing the ###.## style format
strings currently supported by writef. It might be
confusing that you have to escape a literal # with %#,
so for example if you wanted to print #13, you'd
write writef("%##", 13).
The %#### syntax just looks confusing. We have
an alternative already - we could insist that ####.##
style format strings should be written like this
%{####.##} - which is already supported just not required.
That would remove any ambiguity and allow us to make
# print literally again.
Any thoughts on this matter?
There are two other oddities of ###.#### type format
strings that I noticed:
1) complex numbers can be printed in this way, but
they are not padded individually but rather as
a whole. For example,
writef("##########.#", 1.1+2.2i)
would produce
" 1.1+2.2i"
rather than the possibly expected:
" 1.1"+ 2.2i"
2) integers can be printed with ###.## but the result
never has a decimal point, even if the format string
included one:
writef("##.##", 1);
produces
" 1"
rather than the possibly expected:
" 1.00"
Any thoughts on modifying complex and integer support
with ###.## to be more expected? I'm more concerned
about the integer case than the complex case... since
displaying the number with ##.### basically doesn't make
sense for complex numbers...
Thanks,
-michael
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers