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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,da43b4da51073876,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-24 06:19:29 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: lundin_isak@hotmail.com (khendon) Newsgroups: comp.lang.ada Subject: Help needed; Saving access types with sequential_io? Date: 24 Feb 2003 06:19:29 -0800 Organization: http://groups.google.com/ Message-ID: <1946b526.0302240619.695b865a@posting.google.com> NNTP-Posting-Host: 194.47.121.163 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1046096369 29625 127.0.0.1 (24 Feb 2003 14:19:29 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 24 Feb 2003 14:19:29 GMT Xref: archiver1.google.com comp.lang.ada:34511 Date: 2003-02-24T14:19:29+00:00 List-Id: Hi all I'm a novice in ADA programming, and programming in general. For a school project I'm currently working on I'm supposed to create a database that needs to have saving/loading functionality. It's all very simple stuff, but I'm stuck at the moment, since I don't really know how to save the different access types I'm using. The informations is saved in records: type info; type a_info is access info; type a_string is access string; type info is record a: a_string; b: a_string; end record; First, I tried just saving the entire record. That didn't work, my guess is because it contains access types, and whatever they're currently pointing at disapperas when I shut down the program. So, I then thought of saving each string separately. That seemed to work, at least the data got saved as it was supposed to. Unfortunately, I'm having trouble loading the data from the file into new records that will then be added to the database. The only way I can think of is to load the data into temporary string, and then add those strings to the record. The problem with this is that those temporary strings need to have a defined length, so when I add them to the record, they will contain lots of garbage I just don't want there. That's the whole point of using access types in the record in the first place, to be able to save strings of different lengths depending on user input. If anyone could provide any help I would be most grateful. Regards, Isak