Subject: Re: saved state command line args

From: Jan Wielemaker <[email-masked]>
Date: Thu, 2 Mar 2000 10:26:48 +0100

> After upgrading from 2.8.1 to 3.2.6 on a Linux machine
> and after recompiling saved states, 
> command line arguments no longer seem to be accessible 
> to the saved state in the old way.
> 
> The saved state is prepared as follows:
> 
> :- consult(my_pl_file).
> :- qsave_program(savedstate)
> :- halt.
> 
> The test file contains the following 
> 
> go :-     
> 	unix(argv(Arguments)),
> 	append(_SystemArgs, [--|Args], Arguments), !,
> 	write('ARGS:'), write(Args), nl.
> 
> It used to be called as follows:
> 
> $ ./savedstate -t go -- a b c
> 
> But this no longer works: the prolog banner appears, followed
> by the main prompt:
> 
> ?- 
> 
> Could anyone give me some advice ?

Saved states no longer process the Prolog arguments.  If you really need
to you can do

	pl -x savedstate -t go -- a b c

but in general you will do

	:- qsave_program(savedstate, [goal(go)]).

Using this schema, saved-states can process all arguments and don't
need the -- construct any longer.

	Regards --- Jan

P.s.	If you upgrade anyway, I would go for 3.3.x(=2 now)