On 12/18/01 12:48 PM, "Will Hartung" <[EMAIL PROTECTED]> wrote:
> Another VelocityValue patch against 1.2 > > This fixes a minor bug, but it also does a pretty dramatic change. > > With this patch, Velocity now parses and create Doubles. > > It supports the simple floating point numbers. > > 1 <- Integer - 1 > 1. <- Double - 1.0 > 1.2 <- Double - 1.2 > > It does not support numbers in scientific notation, like 1.0E+30. > > This change required a minor change to the grammar, but the build > instructions were sufficient and I don't believe anything truly horrible > broke with the simple change. > > It supports all of the Math and comparisons appropriately. This patch also > fixed a bug with division. The original Division code was Adding...oops. > > I've compressed this patch because it's getting larger. 80K uncompressed. I hate to be the bearer of bad news, but I do believe I did indicate to your first post on this subject that you should review the archives regarding this issue. If you look back in the archives, we have been through this quite a few times - there is a strong interest in keeping floating point numbers out of VTL. To summarize the reasons, it's because many feel that because there is no valid *presentational* use for floating point numbers, and that having that support leads to the inclusion of business logic in the templates. Of course, you can always put business logic in templates if you work at it, but its something that people, don't think should be encouraged. You can get around it if you must using tools. Now, regarding the VelocityValue, I personally don't think that it's appropriate for use in the Velocity core. However, I do think that it is interesting as a toolset that one could use in the context, so we should explore that if you want. I (and I am sure others) do appreciate your efforts in this area, and it would be great if we can find a way to make it available to the community. geir -- Geir Magnusson Jr. [EMAIL PROTECTED] System and Software Consulting "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
