Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #1578

Re: Help with BCD conversion

From HarishD <harishdeshpande@gmail.com>
Newsgroups comp.lang.java.help
Subject Re: Help with BCD conversion
Date 2012-02-17 15:39 -0800
Organization http://groups.google.com
Message-ID <15ebd8e6-c2fe-4ec0-a419-9e968b8e0bf9@p21g2000yqm.googlegroups.com> (permalink)
References <92b642e7-0aa8-4e1a-9e4e-9418bfcc8123@k40g2000yqf.googlegroups.com> <8motj7ljbcapmd0i3kho2g7een4egail5m@4ax.com>

Show all headers | View raw


On Feb 17, 5:33 pm, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> On Fri, 17 Feb 2012 15:21:20 -0800 (PST), HarishD
> <harishdeshpa...@gmail.com> wrote, quoted or indirectly quoted someone
> who said :
>
> >   The first test string "8945771009135617" is printed as
> >"8945771009135617' as expected.
>
> I think you need to explain what you are attempting a bit better.
> Literally your example transform does nothing.
>
> Are you trying to convert strings to IBM 360-styleBCDwhere one
> decimal digit appears in each nibble with the last nibble used to
> encode the sign? in other words a string of bytes?  Or do you want to
> start with a long or int?
>
> This is very similar to converting to hex. Seehttp://mindprod.com/jgloss/hex.html
>
> --
> Roedy Green Canadian Mind Productshttp://mindprod.com
> One of the most useful comments you can put in a program is
> "If you change this, remember to change ?XXX? too".

Yes, I am trying to convert strings to IBM 360- style BCD as you
stated but without the sign. My question is why
the two test cases produce behave differently.

Back to comp.lang.java.help | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Help with BCD conversion HarishD <harishdeshpande@gmail.com> - 2012-02-17 15:21 -0800
  Re: Help with BCD conversion Roedy Green <see_website@mindprod.com.invalid> - 2012-02-17 15:33 -0800
    Re: Help with BCD conversion HarishD <harishdeshpande@gmail.com> - 2012-02-17 15:39 -0800
    Re: Help with BCD conversion HarishD <harishdeshpande@gmail.com> - 2012-02-17 15:47 -0800
      Re: Help with BCD conversion markspace <-@.> - 2012-02-18 08:24 -0800
        Re: Help with BCD conversion Roedy Green <see_website@mindprod.com.invalid> - 2012-02-18 09:06 -0800
          Re: Help with BCD conversion Lew <lewbloch@gmail.com> - 2012-02-18 10:25 -0800
            Re: Help with BCD conversion HarishD <harishdeshpande@gmail.com> - 2012-02-20 06:35 -0800
              Re: Help with BCD conversion Lew <noone@lewscanon.com> - 2012-02-20 11:52 -0800
        Re: Help with BCD conversion Lew <lewbloch@gmail.com> - 2012-02-18 10:21 -0800

csiph-web