Sat 25 May 2013 04:33:49 PM UTC, comment #2:
Hi!
Aside the case insensitivity issue, which can be solved with using
there's a few other issues:
1) no documentation. Could you please write documentation in TexInfo. See other functions in Octave for an example. It's pretty simple.
2) your function only has 4 digit precision, but there's an actual formula which can give a much correct value. See http://en.wikipedia.org/wiki/Standard_illuminant
3) no input check. For this case, the function should start with:
Note on how we are also setting the default value right at the start.
In addition, other things that are just the guidelines for contributions
4) the main function block should also be indented
5) use double quote for strings unless (there's a really good reason otherwise)
6) error message must mention the function name, the variable name (in caps) as it's named in the documentation (you don't have documentation yet so I'm calling it standard), and the wrong value that was given. So it should be something like:
Note that if you made input check as I mentioned above, you'll know it's a string, so you can use %s.
7) specify what block is ending with endfunction, endswitch, etc...
|