Re: output_value

Pierre Weis (weis@pauillac.inria.fr)
Fri, 20 Oct 1995 20:18:30 +0100 (MET)

From: Pierre Weis <weis@pauillac.inria.fr>
Message-Id: <199510201918.UAA24567@pauillac.inria.fr>
Subject: Re: output_value
To: dmakofka@gic.gi.com (Makofka Doug)
Date: Fri, 20 Oct 1995 20:18:30 +0100 (MET)
In-Reply-To: <30871CFF@gicpo2.gic.gi.com> from "Makofka, Doug" at Oct 19, 95 08:48:00 pm

> could someone comment on the difference between:
> do_list (output_value chan) ProductionLst
> and
> output_value chan ProductionLst

If you output the entire list at once you preserve sharing between
values (and their subparts) that are in the list. This could make a
big difference. Still, when you input the list its very easy to
iterate on it.

Otherwise, if there is no sharing involved, and if you want to spare the space
occupied by the list cells, output the elements. Then you can input
them one at a time until end_of_file is reached.
(try
while true do f (input_value chan) done
with Eof -> ())

Pierre Weis
----------------------------------------------------------------------------
WWW Home Page: http://pauillac.inria.fr/~weis
Projet Cristal
INRIA, BP 105, F-78153 Le Chesnay Cedex (France)
E-mail: Pierre.Weis@inria.fr
Telephone: +33 1 39 63 55 98
Fax: +33 1 39 63 53 30
----------------------------------------------------------------------------