From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,28a24746aa07c732,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!news.cs.univ-paris8.fr!proxad.net!cleanfeed3-a.proxad.net!nnrp18-2.free.fr!not-for-mail Return-Path: X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Design help Date: Fri, 9 Mar 2007 16:43:06 -0600 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Design help Thread-Index: AcdinE4A3IGn30wSQoK1BGexk5glqw== From: "Carroll, Andrew" To: X-Virus-Scanned: amavisd-new at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.9rc1 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.ada Message-ID: X-Leafnode-NNTP-Posting-Host: 88.191.17.134 Organization: Guest of ProXad - France NNTP-Posting-Date: 09 Mar 2007 23:45:07 MET NNTP-Posting-Host: 88.191.14.223 X-Trace: 1173480307 news-2.free.fr 5899 88.191.14.223:58576 X-Complaints-To: abuse@proxad.net Xref: g2news1.google.com comp.lang.ada:14439 Date: 2007-03-09T23:45:07+01:00 I am trying to design (what I guess is) a database table adapter. Yes, it is a master's course assignment. The current design is to use a file and have one record per line. My goal is to get each line to be "serialized" so I can read the whole line in bytes and then take chunks of it and "cast" those into objects. On this list from a previous poster I found: type Byte is range 0..255; for Byte'Size use 8; package Byte_IO is new Sequential_IO(Byte); Does that mean I could define the record like: type dbrecord is range 0..sum_of_sizes_of_attributes; for dbrecord'size use sum_of_sizes_of_attributes; package DBRecord_IO is new Sequential_IO(dbrecord); My next big question.... If I had myrec: dbrecord; ... Dbrecord :=3D ... ... X :=3D dbrecord(33..70); --what type is x here? attribute :=3D cast(X); --how do I cast x to an 'class? Am I making any sense? Andrew Carroll Software Services 405-744-4943 andrew.carroll@okstate.edu