I think you have got to write your own record printing procedure.
In Oz, strings are just lists of integers, and "System.show" is not
smart enough to distinguish them.
The good news is that this is not really difficult.
Just iterate over the list of pairs you get from "Record.toListInd".
Use "String.is" to check whether a field is a string.
Use "System.showInfo" for strings and "System.show" for all other values.
Also, note that whitespace can be significant in Oz:
tmApp(tmVar ("x") tmVar("x"))
is a tuple with three components: an atom tmVar, a string "x" and a
tuple with the single component "x".
Cheers,
Wolfgang
Daniel Zingaro wrote:
Thanks--this does the trick!
There's one further issue I'm running into, and that is printing
strings. For example, if I write this:
Z in
Z = tmApp(tmVar ("x") tmVar("x"))
{System.show Z}
I get numeric ASCII code representations of the strings as output
([120]), instead of a nice "x", using System.show. I get runtime
errors when using System.showInfo. Any way to deal with this, short of
writing a predicate to print out the components with showInfo? =(
Thanks again,
Dan
At 02:19 AM 11/11/2006, you wrote: [...]
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users