Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-228

floating point number capability

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.5
    • 1.5
    • Engine
    • None
    • Operating System: other
      Platform: Other
    • 24792

    Description

      This patch adds floating point capability to VTL. It's based on code mainly
      written by Peter Romianowski with a supporting role from myself. I'm putting
      this in Bugzilla as much of this code was shared over the mailing lists in
      fragments this summer and is difficult to access. This issue can serve
      instead as a repository for the latest pre-CVS committed version.

      Included is the following:
      – ability to enter literal numbers in the form of integers or floating point
      numbers
      – all math and comparison functions work with floating point numbers
      – arbitrary objects that implement the interface TemplateNumber are treated
      as numbers in arithmetic or comparison
      – method calls with numbers, as shown in TestNumberMethodCalls.java

      Known Issues:
      – an object implementing TemplateNumber cannot be used as an numerical
      argument in a method call.

      With regards to the last point, please see recently-posted discussion on the
      velocity-dev list.

      The patch is done against CVS head (1.5 dev, after the map patch). I've
      included all parser files. It's not necessary, but you may want to re-run
      jjtree and javacc to regenerate Parser.java, etc if you have a customized
      Parser.jj.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--fp_test.patch
          6 kB
          Will Glass-Husain
        2. ASF.LICENSE.NOT.GRANTED--fp_testcases.xml.patch
          2 kB
          Will Glass-Husain
        3. ASF.LICENSE.NOT.GRANTED--fp.patch
          228 kB
          Will Glass-Husain
        4. ASF.LICENSE.NOT.GRANTED--fp.patch
          220 kB
          Will Glass-Husain

        Activity

          People

            Unassigned Unassigned
            wglass@forio.com Will Glass-Husain
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: