Article View: borland.public.jbuilder.java.language
Article #17599Bad integer values when converting from DOS, Basic
From: John F. Dutcher
Date: Mon, 26 Oct 1998 00:00
Date: Mon, 26 Oct 1998 00:00
12 lines
1292 bytes
1292 bytes
Java users: Can any comment on the following integer problem ? I am converting a system from DOS written in Microsoft Quick Basic (compiled). I have had to discover that the 2 byte integer in DOS based files use a reverse byte format from those used in JAVA. This is the big endian, little endian dilema for those acquainted with those terms. When reading the DOS files for conversion with JAVA the integer values are, of course, all wrong. I tried simply 'byte switching' which seemed like the appropriate and simple solution to getting JAVA integers in the 'endian' format it wants. This does not produce good values however. (I don't know why). Has anyone seen or used a solution that will covert these DOS, Basic integers to true valued JAVA integers ??
Technical Details
Message-ID:
<01bdffb3$c59ef600$2b6fcad0@jfdutcher>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,8670dec9948c4a7e,start X-Google-Attributes: gidf74b3,public From: "John F. Dutcher" <jfdutcher@mkl.com> Subject: Bad integer values when converting from DOS, Basic Date: 1998/10/26 Message-ID: <01bdffb3$c59ef600$2b6fcad0@jfdutcher> X-Deja-AN: 405029342 Content-Transfer-Encoding: 7bit Organization: Basswood Computer Programming Content-Type: text/plain; charset=ISO-8859-1 Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language