Interpolating Strings documentation example

Just reading the docs and got to this example:

Now try this with a complex variable and see what happens:

complex = [1,2,3];
welcome = "Good morning #complex#, how are you today (#now()#)?";
writeoutput( welcome );

That errors, which I’d expect but the docs don’t confirm that it will error so was wondering if the docs need to be updated to say “it errors as it’s not a simple value, but you can use toString if you want to use complex values” or if there was an intent for BoxLang to auto-magically call toString() on it? I suspect it’s the former, but wanted to clarify.

It is a simple value though, at least according to isSimpleValue(). The auto conversion to string is not happening. I also noticed that expressions like someDate == "" throw an error instead of returning false (not sure if that is supported in bx syntax but it fails using bx-compat).


Ignore what I said except the date expression issue. I, apparently, didn’t fully comprehend the OP.