Jan Tammen wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello list!

Is there any possibility to convert a FD var to a string in order to
display it e.g. in a GUI? Say I have a list of values (containing
integers and constraint variables) and want to show their values in a
GUI, e.g.

[1 1#9 5 2#3 4]

I alos tried to check the type of the variable, but Int.is does not seem
to work on fd vars.

Use Value.toVirtualString, then convert the virtual string into a string or an atom. See:

declare X in
X :: [1#10 20#30]
{Show {VirtualString.toAtom {Value.toVirtualString X 0 0}}}

Cheers,
raph
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to