🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17891

Unsigned Long .. to integer

#17891
From: Arumugam
Date: Thu, 17 Sep 1998 00:00
17 lines
1062 bytes
In C, we have unsigned long data type.  I am receiving some data from C
server.
In that, I have unsigned long..
But, in JAVA, there is no unsigned data types..
After receiving the data, I am updating the unsigned long value to an
integer variable, since unsigned long in C is 32 bit and int is 32 bit
in Java.
For Example :
    Unsigned long hex value from server is 0x000000ff, then I have to
receive 255 as equivalent integer value on Client java side.  But I am
getting value as -1.  Please let me know the reason.

Thanks in advance

with Regards

Arumugam
Technical Details
Message-ID: <3600B715.56A9B576@mss.co.jp>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,682758068c8b577d,start
X-Google-Attributes: gidf74b3,public
From: Arumugam <arumugam@mss.co.jp>
Subject: Unsigned Long .. to integer
Date: 1998/09/17
Message-ID: <3600B715.56A9B576@mss.co.jp>
X-Deja-AN: 391974241
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=iso-2022-jp
Organization: MSS
Mime-Version: 1.0
Reply-To: arumugam@mss.co.jp
Newsgroups: borland.public.jbuilder.java.language