<p>Am 19.10.2017 07:45 schrieb "Ryan Joseph" <<a href="mailto:ryan@thealchemistguild.com">ryan@thealchemistguild.com</a>>:<br>
><br>
> How should you print types in generics for debugging? here’s an example of how I’m doing it now but it’s hacky (forced type casting pointers) and tkSString crashes like it is. There should be a better solution I think.</p>
<p>There isn't really a better solution, except that you could move that code to a separate class or record so that you can use it in other classes/record than TStaticArray as well...<br>
And your case for tkSString crashes, because that is a ShortString, not a AnsiString thus you need to cast to PShortString (best avoid "(P)String" in this context as this could lead to different results depending on the modeswitches). For the other string types you need to look at tkAString (AnsiString), tkWString (WideString) and tkUString (UnicodeString).</p>
<p>Regards,<br>
Sven</p>