Re: Consulting a memfile
Carlo Capelli <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CABty9wyEMCY+4Gf2CFyct+ZTdk4PqX0HzdZD3+1wJvUweCMEvw@mail.gmail.com> |
Hi Paulo
I think it's already supported, see the last option of
load_files<http://www.swi-prolog.org/pldoc/man?predicate=load_files/2>/2,
but I don't know if you can consult such memfile.
A silly test
test2 :-
atom_to_memory_file('t:-writeln(1).', H),
open_memory_file(H, read, S, [free_on_close(true)]),
load_files(a_name, [stream(S)]),
close(S),
t.
bye Carlo
2013/10/10 Paulo Moura <[email protected]>
> Hi,
>
> I'm looking into the "memfile" library and wondering (1) how easy it would
> be to add support for consulting them like we do with an ordinary file and
> (2) how fast creating/writing to a memory file and then consulting it would
> be compared to create, write to, and consult an ordinary temporary file.
> Your feedback is most appreciated.
>
> Cheers,
>
> Paulo
>
> -----------------------------------------------------------------
> Paulo Moura
> Logtalk developer
>
> Email: <mailto:[email protected]>
> Web: <http://logtalk.org/>
> -----------------------------------------------------------------
>
>
>
>
> _______________________________________________
> SWI-Prolog mailing list
> [email protected]
> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>
-------------- next part --------------
HTML attachment scrubbed and removed