since release 4.0.3
#include <sicstus/sicstus.h> int SP_set_argv(int argc, char **argv, spio_t_bits options);
argv prolog flag.
The number of elements of the
A vector of strings that can be accessed by
This argument is copied by
SP_set_argv() so it can be discarded
by the caller. May be passed as
argc is zero.
The encoding used when converting the entries to atoms is determined
options is zero then each entry in
argv is assumed to
be an encoded string, i.e. encoded using ‘UTF-8’. This is
the same as passing
SP_initialize() except that
SP_initialize() will not
report failure even if the
argv entries are not suitable as
atom names. Note that UTF-8 may not be the encoding used by the
operating system when invoking
each entry in
argv is assumed to be encoded using some system
encoding. This is only useful on Unix-like systems since it is
preferable, and trivial, to obtain and pass a UTF-8
The system encoding used by
SP_set_argv() will be the first
character encoding specified by the following environment variables:
LC_ALL (only on Unix)
LC_CTYPE (only on Unix)
LANG (only on Unix)
if none of these are set then the operating system will be queried in some platform specific way.
Please note: For best results on Unix-like platforms you should use a locale based on UTF-8.
Zero if the argument entries cannot be converted to atoms, and a nonzero value otherwise.
Initializing the Prolog Engine.