toString
Basile B.
b2.temp at gmx.com
Mon Dec 31 10:19:29 UTC 2018
On Monday, 31 December 2018 at 10:13:17 UTC, Michelle Long wrote:
> Display variables in the watch shows the variables in a flat
> list. Can we just get an override for toString or some other
> method to change what is displayed?
>
> Surely this can be accomplished?
>
> Even if it means creating an external DLL that Visual D can
> read and choose the right function and use it to take the
> object and return a string and simply display that string
> instead of whatever Visual D is generating internally?
>
> struct S
> {
> int x;
> }
>
>
> Somewhere
>
> auto S_toString(S s)
> {
> return "S: "~s.x;
> }
>
> Should be very simple to do. Visual D just uses that function.
when it's easy enough do it yourself ;)
More information about the Digitalmars-d-ide
mailing list