Page 1 of 1

Display of character stirng results

Posted: Wed Aug 13, 2008 3:17 pm
by HughDarwen
This is just an idle observation and should not be treated with any degree of urgency at all. If there's a prioritised list of planned enhancements, please put it at the bottom if you plan to accept it at all.

There's a curious difference in treatment of tuple{x 'abc'} and just 'abc'. The result display for the tuple expression shows quotes (actually double ones) around the string but the result display for the string expression doesn't. Moreover, toggling the Enhanced switch has no effect.

The original (unenhanced) method of display was intended to give one a Tutorial D literal denoting the value in question--an excellent idea which proved popular. Why wasn't that principle applied for character strings too?

Also, what about the idea, now, of adding the quotes only when Enhanced is off, for strings in tuples and relations as well as standalone strings?

Hugh

Re: Display of character stirng results

Posted: Sat Aug 16, 2008 12:02 pm
by Dave
Yes, output of strings is certainly inconsistent with other types. This harks back to the time when OUTPUT was the sole output mechanism, so strings needed to be stripped of their delimiters so the old backup script would work. It's easy to change (I have to change a '0' to a '1' in one place!), so I'll alter this for the next update.

I'll also strip the string delimiters on the enhanced output.