Support for Common Types

Fernando Ribeiro, created Jan 26. 2015 Is there any way to pass booleans and Strings, for example, to predicates, in the same fashion as integers? If not, would you consider adding that support?

Comments

Re: Support for Common Types

Fernando Ribeiro, created Jan 27. 2015 I've found that my issue with strings was caused by a boolean standing in the way, which I've replaced by a string. Thanks!

Re: Support for Common Types

Jan Burse, created Jan 27. 2015 Hi, You can pass Strings by simply declaring an input parameter as type String or a return value of type String. On the Prolog side this will be an atom. Jekejeke Prolog atoms support the Unicode characters. Jekejeke Prolog atoms are relatively lightweight. They are not kept in a table, so you can easily high frequently even create large ones. Internally their encoding is UTF-16 with surrogates. Booleans are not supported as data type parameters. When the foreign Java method has a boolean return type, then it can indicate success or failure of the corresponding Prolog predicate. A list of the supported data types is found here: http://www.jekejeke.ch/idatab/doclet/prod/en/docs/05_run/10_docu/02_reference/07_theories/06_reflect/03_foreign.html Bye