EXDR defines the abstract data types Integer, Double, String, List, Nil, Struct and Anonymous Variable. Their mapping to ECLiPSe data types is as follows:
EXDR type ECLiPSe type e.g.
----------------------------------------------
Integer integer 123
Double float 12.3
String string "abc"
List ./2 [a,b,c]
Nil []/0 []
Struct compound or atom foo(bar,3)
Anon.Variable var _
Not all ECLiPSe terms have an EXDR representation, e.g. big integers,
rationals, suspensions or attributed variables.
More information about EXDR format, including the specification of the serialised encoding, can be found in the Embedding and Interfacing Manual.
Success:
[eclipse 4]: open(queue(""),update,q),
write_exdr(q, foo(12.3,123,["hello",_])),
read_exdr(q, Term),
close(q).
Term = foo(12.3, 123, ["hello", _131])
yes.
Error:
read_exdr(S, a(b,c)). (Error 4).
read_exdr(input, X). (Error 192).
read_exdr(atom, X). (Error 193).