www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/12/16:23:06

From: Alicia Carla Longstreet <carla AT ici DOT net>
Newsgroups: comp.os.msdos.djgpp,comp.programming,comp.unix.programmer,comp.os.msdos.programmer
Subject: Re: quickbasic record to c struct?
Date: Wed, 11 Dec 1996 20:44:19 -0500
Organization: The Computer Solution
Lines: 25
Message-ID: <32AF6373.2551@ici.net>
References: <58gksj$ign AT butterfly DOT hjs DOT com>
Reply-To: carla AT ici DOT net
NNTP-Posting-Host: d-ma-fallriver-13.ici.net
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

John M. Flinchbaugh wrote:
> 
> i have the following quickbasic 4.5 structure that i use for records in
> a file:

<snip out stuff>

Alignment is not a problem, what you need to do is develop a routine for
reading the file.  Assuming all the information is in the file you
simply need to read one record into a character buffer then parse it and
place the results into the appropriate structure members.

Actually, you may not even need to do this, since the difference may be
entirely in memory.  Please note that due to the differences between
block oriented devices like the disk drive and memory, a particular
record my occupy a different amount of storage on the disk than it does
in memory.

I suggest you write a quick routine to read and display your records in
gcc, then decide what you need to do to crreate a match.  Once you have
done this if you still have a problem, e:mail me, I may be able to help
further.

Alicia Carla Longstreet
The definition of an upgrade:  Take old bugs out, put new ones in

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019