Re: constant values INDOMAIN_* in fd_values_c.c

Daniel Diaz <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
Otmane BENKIRANE a écrit :
> hello,
> 
> thank you for you last answer.
> 
> In the fd_values_c.c file, I don't understand what's mean  the  constant
> value in #define (an ascii conversion, ...), how  can i  obtain this
> value if i define others constants ?
> example :
> #define INDOMAIN_RANDOM_ALT  X24696E646F6D61696E5F72616E646F6D5F616C74
> 
> Thanks

Each Prolog predicate gives rise to a C identifier built with the ASCII 
code of each character of the predicate. In this case the predicate is
'$indomain_random_alt' defined in fd_values.pl (24 is the ASCII code of 
$, 69 of i,...).

A way to obtain it is to use hexgplc as follows:

hexgplc -H '$indomain_random_alt'
X24696E646F6D61696E5F72616E646F6D5F616C74

See also the documentation: 
http://gnu-prolog.inria.fr/manual/manual008.html#toc11



-- 
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.
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.