@verb #84:"format_value" this none this rxdo #60
@program #84:"format_value" this none this
"Return the value with matching list brackets styled in a pretty manner."
{value, ?depth = 1} = args
if (typeof(value) != $LIST)
return toliteral(value)
endif
output = ""
for x in (value)
$command_utils:suspend_if_needed()
if (output)
output = output + ", "
endif
output = output + this:format_value(x, depth + 1)
endfor
tags = {{"", ""}, {"", ""}, {"", ""}, {"", ""}}
tag = tags[min(depth, length(tags))]
output = tag[1] + "{" + tag[2] + output + tag[1] + "}" + tag[2]
return output
"Last modified by Dax (#789) on Wed May 4 06:46:01 2005 MDT."
.