converts a list into a struct and vice versa
=..(Struct, List) (x,x) Struct =.. List (x,x)
void(Struct) (x) Struct that is described by List
void(Struct) (X) List that is related to the struct
This is a standard prolog built-in. '=..' succeeds, if the List contains the functor of Struct followed by its arguments. It can be used in two basic ways, transforming a List into a Struct or the other way round. Note that if provide the List, its first element must match an atom, since it becomes the functor of the Struct.
write("Functor: "),read(F), write("Arg1: "),read(A1), write("Arg2: "),read(A2), Struct =.. [F,A1,A2], write("Struct = ",Struct).
No runtime errors. Fails if transformation can't be conducted.
prolog-process, client-server, object