converting cmdline args to terms

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Sep 14 16:06:59 AEST 1998


On 14-Sep-1998, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> On 13-Sep-1998, Peter Herkenrath <aik01 at rrz.uni-koeln.de> wrote:
>  
> > BTW maybe(mercury-users), 
> > I have to convert cmdline args to a term (string->foo)
> > Your official tip except parsing via list(char)?
> 
> The latest development sources have `parser__read_term_from_string'.
> The "official tip" is to use this and then `term__term_to_type'.
> 
> I'm pretty sure parser__read_term_from_string isn't in 0.7.3, but
> feel free to check.  If not, the latest development version is on
> the ftp site:
> 
> ftp://turiel.cs.mu.oz.au/pub/mercury/beta-releases/

Yep.  An work-around that works with older versions is to write the
strings out to a temporary file and then read them back in again.
Of course using `parser__read_term_from_string' is much nicer...

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the users mailing list