Normally one can MsgBox(variable), as long it's simple type - such as string, integer, and so on (or rather transformed to string for displaying). It's not as simple for arrays and objects though, so I think we could use a dedicated function. Consider PHP's var_dump as example.
Cap'n Odin wrote the following on-the-go, but it's far from what it can become:
Code: Select all
ObjToString(obj)
{
if (!IsObject(obj))
return obj
str := "`n{"
for key, value in obj
str .= "`n" key ": " ObjToString(value) ","
return str "`n}"
}