Hi there,
I believe the following snippet is ISO Prolog (I have
checked it with several Prolog systems, just to make sure
my reading of the standard was plausible), but YAP 4.3.22
seems to disagree:
p :-
write('\
Something...\n\
... and something else.\n').
If there is any workaround I would appreciated very much
knowing about it.
All the best
Roberto
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara@cs.unipr.it
Hi there,
in order to support both C and C++ compilers, it would be nice
to add a conditional `extern "C"' wrapper to c_interface.h.
While we are at it, we should probably also add the usual guard
against multiple inclusion.
The standard way to do that is as follows:
#ifndef _Yap_c_interface_h
#define _Yap_c_interface_h 1
/*
__BEGIN_DECLS should be used at the beginning of the C declarations,
so that C++ compilers don't mangle their names. __END_DECLS is used
at the end of C declarations.
*/
#undef __BEGIN_DECLS
#undef __END_DECLS
#ifdef __cplusplus
# define __BEGIN_DECLS extern "C" {
# define __END_DECLS }
#else
# define __BEGIN_DECLS /* empty */
# define __END_DECLS /* empty */
#endif
__BEGIN_DECLS
put current contents of c_interface.h here
__END_DECLS
#endif
All the best
Roberto
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara@cs.unipr.it