From: Davide P. C. <dp...@un...> - 2006-09-20 23:42:27
|
> In testing an answer, "3 ft / s" worked for me, but "3ft / s" gave > a pink screen. Sorry about that. I have fixed it, and now use a more sophisticated approach to strip off the units that will find them even when there is no leading space. But since the %Units::known_units hash is private, the pattern is a little more aggressive than it ideally would be. This shouldn't be a problem for well-formatted answers, but some erroneous answers may get unhelpful messages. For example entering "3x" would give an error about unknown unit 'x'. The regexp approach is never going to be perfect, but the better approach would be to make a proper units class for the Parser. Davide |