[fpc-pascal] Unit/library for writing data structures to files
Michael Van Canneyt
michael at freepascal.org
Sun Aug 10 10:18:42 CEST 2008
On Sat, 9 Aug 2008, Francisco Reyes wrote:
> I looked through the contributed units in the http://freepascal.org site and
> did not see anything that could take an array or some other data structure and
> write it to disk. Also the library would need to do the opposite, read from
> disk into a data structure.
> I figure before I try and re-invent the wheel I would ask if there is any good
> libraries/unit(s) like that already. Perhaps something simmilar to what Python
> has on it's Picle library.
> Is the Objects unit what I am looking for?
> In this url
> I foud this description.
> This unit provides the base object for standard Turbo Pascal objects. It also
> implements File and Memory stream objects, as well as sorted and non-sorted
> collections, and string streams.
> > > File and Memory stream objects
> The application I am trying to do is a database.
> I want to try some concepts for doing Analytics/OLAP work and performance will
> be a concern so I figure FPC would be a good tool for the job.
> >From reading this URL
> I see one can write records to a file. Would that be a feasible approach?
Indeed. That's why it exists :-)
You can also try the Classes unit if you use object oriented programming.
Each component can write itself to stream.
More information about the fpc-pascal