Re: style_check(+string)

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 02/03/2014 02:15 PM, Piet Mertens wrote:
> Hi,
>
> After upgrading from swipl 6.2.6 to 6.6.1, error messages are generated
> when loading the CTT package (http://www.buch-kromann.dk/matthias/ctt/),
> which uses PCE.
>
> The first error occurs after the directive
>
>      :- style_check(+string).
>
> ERROR:
>          Domain error: `style_name' expected, found `string'
>
> The string specification is not mentioned in the reference manual of swipl (anymore) and I don't know its meaning.
> I noticed the recent changes in the representation of strings.
>
> After removing the style_check(+string) directives, an other error occurs after the call
>      send(@ctt, cmd_tracer_new).

Removing changes things.  As correctly mentioned by some user 
(Richard?), the `string' option was not a style check.  It caused
"hello" to be read as a string object rather than a code list.  This
can be achieved using the ISO flag double_quotes, although the
value 'string' is not ISO :-(

:- set_prolog_flag(double_quotes, string).

> ERROR:
>          file ->initialise: Argument 1 (path): `[name]' expected, found `@nil/constant'
>
> May the latter error also be explained by recent changes to swipl? Can it be avoided?

Possibly by the above.  Consider new(F, file("hello")).  This is valid
with the flag above, but without it is not.

	Hope this helps.

		--- Jan

>
> Thanks for your help!
>
> Piet
>
> -------------- next part --------------
> HTML attachment scrubbed and removed
> _______________________________________________
> SWI-Prolog mailing list
> [email protected]
> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.