|
From: Petr M. <mi...@ph...> - 2008-12-08 18:16:20
|
> set binary datafile array=Infx5 format="%double%double" > > Someone please remind me why we need oddball format specs like > format="%double%double" > rather than > format="%lf%lf" > I'm sure I must have asked this before, when the code went into CVS, > but I have forgotten the answer. Can we get rid of additional hundreds > of lines of obscure code simply by requiring that users provide > a valid C format statement for reading their own binary data files? Implementation of general binary files comes from 2003. We exchanged a lot of e-mails with Daniel Sebald. Nobody came with such a proposal as you have now. The main reason for format="%double%double" and not "%lf%lf" is that textual headers of image or volume files have keywords like char, byte, double, int, float, etc. That's why we had used the same keywords for "format" as well. On the other hand, your proposal "%lf%lf" reflects the formating from programmer's point of view. However, in C, there is no special formatting for signed and unsigned char, so we are out of luck for this notation. --- PM |