Java | Prolog |
Integer | integer |
Double | real |
Long | integer |
BigInteger | integer |
Boolean | integer |
Character | string (list of codes) |
String | string (list of integers) |
Object array | list |
Object | $addr(I1,I2) |
Prolog | Java |
integer | Integer |
real | Double |
atom | String |
string | Object array |
list | Object array |
structure | Object |
The conversion between arrays and lists needs further explanation. A Java array of some type is converted into a list of elements of the corresponding converted type. For instance, an Integer array is converted into a list of integers. In contrast, a Prolog list of any type(s) of elements is converted into an array of Objects. When an array element is used as a specific type, it must be casted to that type.
Neng-Fa Zhou 2013-01-25