users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: consult from command-line (was GNU Prolog FAQ)


From: Daniel Diaz
Subject: Re: consult from command-line (was GNU Prolog FAQ)
Date: Tue, 04 Dec 2001 10:30:12 +0100

Right Christian, in 1.2.9 I include a --goal option to launch a give goal (I 
need this under Win32).


Christian wrote:
> 
> > While we are on the subject, is there a way to specify a file to consult
> > at startup (e.g. -l in sicstus)? I couldn't find anything on the website
> > or in the list archive, and gprolog --help is _very_ laconic.
> >
> 
> No, not in the standard toplevel, but u can compile your own new toplevel
> which parses the commandline options for example.
> 
> %file foo.pl
> :- initialization((argument_list(L),consult(L))).
> %end
> 
> compile it (note: no --min-size and such if u want a neww full toplevel)
> $ gplc foo.pl
> ./ foo is ur new toplevel now
> start it and consult bar.pl baz.pl
> $ ./foo bar baz
> 
> cu Christian
> 
> _______________________________________________
> Users-prolog mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/users-prolog

-- 
Daniel Diaz   address@hidden
http://pauillac.inria.fr/~diaz
gprolog --version 2>&1 | sed -n -e 's/By //p'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]