Subject: Re: [SWIPL] string/1

From: Jan Wielemaker <[email-masked]>
Date: Sun, 27 Jan 2002 17:08:57 +0100

Maybe this should be in the FAQ.  Most of the info is in

http://www.swi.psy.uva.nl/projects/SWI-Prolog/Manual/strings.html

Briefly, using default settings strings cannot be read.  You can modify
the prolog flag double_quotes:

?- set_prolog_flag(double_quotes, string).

?- string("foobar").

Yes

Think carefully before using strings.  See comments in the manual.

	--- Jan

> Under what conditions does string/1 succeed?  Not any of these... !
> 
> 
> ?- string("abc").
> No
> 
> ?- string('abc').
> No
> 
> ?- string([a,b,c]).
> No
> 
> ?- string(`abc`).
> ERROR: Syntax error: Operator expected
> ERROR: string(`
> ERROR: ** here **
> ERROR: abc`) .