users
[Top] [All Lists]

Re: [cinjug-users] Java vs. C

To: "Hudson, Loren (GE Infra, Aviation, Non-GE, US)" <loren.hudson@xxxxxx>
Subject: Re: [cinjug-users] Java vs. C
From: "James Carman" <james@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 15 Oct 2007 14:48:02 -0400
Cc: users@xxxxxxxxxx
Delivered-to: mailing list users@xxxxxxxxxx
In-reply-to: <0BE974242D712B4B86B49792A69D789C02C37DF5@xxxxxxxxxxxxxxxxxxxxxxxx>
Mailing-list: contact users-help@xxxxxxxxxx; run by ezmlm
References: <751717.27922.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <0BE974242D712B4B86B49792A69D789C02C37DF5@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: jcarman@xxxxxxxxxxxxxxxxxxxx
Is the old code making any assumptions about the size of an int when
doing the bit shifting?

On 10/15/07, Hudson, Loren (GE Infra, Aviation, Non-GE, US)
<loren.hudson@xxxxxx> wrote:
>
>
> All,
>
> I'm currently working on porting some C code over to Java.  The code opens a
> binary file, extracts the relevant data, and spits out a .csv file.  I'm
> getting some issues with the totals being off.
>
> The code was originally written by an engineer, not a programmer.  This is
> the fourth such program I've ported, and haven't had any real issues.  For
> the most part, I just wrap the already-written C code with some Java data
> structures, change the file i/o to use Java commands, and I'm done.  The
> program uses bit masking, bit shifting, and a whole host of global
> variables.
>
> My question is this:  Are there any pitfalls that you know of that I could
> be falling into with the C code that compiles as Java code?  I've never used
> C before, so this program is really the extent to which I know C.
>
> Thanks,
>  Mike Hudson
> MDW - Military Data Warehouse
> Java Developer/Solution Architect
> Sogeti Consultant
> loren.hudson@xxxxxx
>

<Prev in Thread] Current Thread [Next in Thread>