How can I convert record to string in Mozart OZ
-
31-05-2021 - |
Frage
For example:
local A = aircraft(id:'Avro' size:[2 36] state:state(time:20 status:parked))
in
{Browse A}
end
I would like to convert A to string like Browse window in order to send the data to other program via pipe (serializing).
Exist any Mozart native function or any short way? Thanks for your ideas
Lösung
Take a look at the library function Value.toVirtualString
(docs). For DepthI
and WidthI
you just chose some large integer value if you don't want to limit the output.
To make sure that the result is a string (not a virtual string), use VirtualString.toString
.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow