🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Reading Files made with BP7

#14491
From: Hans Hinnekint
Date: Fri, 27 Aug 1999 00:00
28 lines
1343 bytes
I need to read some files, made with BP7.

The files were writen using records of type TOldInstructionRec.

   Type
      PCommentType = ^TCommentType;
      TCommentType = Array [0..37] of Char;

      POldInstructionRec = ^TOldInstructionRec;
      TOldInstructionRec = Record
            Token       : SmallInt;
            Parameter   : SmallInt;
            Comment     : TCommentType;
            Xcoord      : single;
            Ycoord      : single;
            Zcoord      : single
         end;

If I use a RandomAccessFile (the only way one I know for reading datatypes
directly) the data doesn't match. (probably some byte-swapping problem)

In JBuilder3 I use a Short for the SmallInt and a Float for the Single.

How can I correct this problem ?

kind regards,
Hans Hinnekint
hansh@vds-deinze.com
Technical Details
Message-ID: <7q5c79$q4810@forums.borland.com>
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,4346708a550a4d5f,start
X-Google-Attributes: gidf74b3,public
From: "Hans Hinnekint" <hansh@vds-deinze.com>
Subject: Reading Files made with BP7
Date: 1999/08/27
Message-ID: <7q5c79$q4810@forums.borland.com>
X-Deja-AN: 517707674
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.language