Numval, Version 2: Numeric validators.
 
This note is important if you were using previous version of
NUMVAL.
 
Version 2 of NUMVAL uses Picture Validators that were broken
in BC 4.0, and therefore assumes that you are using BC 4.02
or higher. It has right-aligned numbers in the fields,
better error checking (you can't enter "1.E.e.E.2" any
more), and gives separate error message for range overflows
and wrong syntax.
 
A few change you have to make to your code from previous
versions:
 
1.) Define you Edit fields in the Resource Workshop as
right-justified and (!!!) multiline. If you forget the
multiline, right-justification does not work. You may have
to increase the height of the field a little bit, or remove
the border, because for reasons I don't understand multiline
edits don't show text if they are too low.
 
2.) The name of the validator template have changed
slightly.
 
TFloat2Validator:   maximally two decimals floats
TFloatValidator:    arbitrary decimals floating point, no E allowed
TFScienceValidator: arbitrary decimals floating point, E optional
TDScienceValidator: arbitrary decimals double, E optional.
 
3.) There is a special compile-time option
  #define EMPTY_IS_ZERO.
 
If it is defined, empty fields are valid and treated as
zero.
 
The most complex part in the current implementation is in
the decision when to write too long strings in scientific
notatation on first display. I think there are still many
special cases, and it would be nice to hear if you have
better default ideas for large/small number input. I have
not checked this part of the implementation in detail.
 
Dieter Menne
Biomed Software
Olgast. 7
D-72074 Tuebingen
