Previous Up Next

Chapter 9  EXDR Data Interchange Format

We have defined a data interchange format called EXDR for the communication between ECLiPSe and other languages. The data types available in this format are integer, double, string, list, nil, structure and anonymous variable. This is intended to be the subset of ECLiPSe types that has a meaningful mapping to many other languages’ data types. The mapping onto different languages is given in the following table. For details of the mapping between Java classes/interfaces and EXDR/ECLiPSe types see Section 8.3.1.

EXDR typeECLiPSe typeTCL typeJava type
Integerintegerint java.lang.Integer
e.g.123123 123
Longintegerstring java.lang.Long
e.g.50000000005000000000 5000000000
Doublefloatdouble java.lang.Double/Float
e.g.12.312.3 12.3
Stringstringstring java.lang.String
e.g."abc"abc "abc"
List./2list java.util.Collection
e.g.[a,b,c]{a b c}
Nil[ ]/0empty string java.util.Collection
e.g.[ ]{} "" 
Structcompoundlist CompoundTerm/Atom
e.g.foo(bar,3){foo bar 3} 
Variablevariablestring null
e.g.__

The EXDR Integer data type is a 32-bit signed integer, the EXDR Long data type is a 64-bit signed integer, bigger ECLiPSe integers cannot be represented. The EXDR Variable type only allows singleton, anonymous variables, which means that it is not possible to construct a term where a variable occurs in several places simultaneously. The main use of these variables is as placeholders for result arguments in remote procedure calls.


Previous Up Next