Loading ...
Sorry, an error occurred while loading the content.

RE: Arithmetic

Expand Messages
  • David Fishburn
    ... Thanks Tim, that worked just fine. I also liked you test script. So odd to see you actually using a function .... Was this ever created as a Tip, I did
    Message 1 of 17 , May 4 11:10 AM
    • 0 Attachment
      >
      > > :echo AddDecimal('0.001', '0.02')
      > >
      > > returns 17 for me.
      >
      > Looks like that [insert expletive of choice] octal cruft
      > getting in the way. Looks like at one point it was adding
      > "020" and "001", which, in octal, is of course, "021" (17, decimal).
      > Blech. This one took a while to work around. :) The one at
      > the end of my post (adjusting in case Mozilla bungs long
      > lines...if the first character on the line isn't a
      > function/endfunction, it's been wrapped) with which I also
      > included a little test harness for any future test cases you
      > want to throw at it.
      >
      > I tried to polish it a bit with a few comments in case you
      > wanna muck with it :) No guarantees on this...don't go
      > guiding your rockets, or even your grandmother's car with
      > this code. Bugs may abound :)

      Thanks Tim, that worked just fine. I also liked you test script.

      So odd to see you actually using a function ....

      Was this ever created as a Tip, I did a few searches on Vim.org but never
      found any reference.

      Dave
    Your message has been successfully submitted and would be delivered to recipients shortly.