Replies: 2 comments
-
Shot in the dark but I did happen to see a Reddit post about converting this to ANSI-C before trying to port it to JavaScript. The op mentioned starting a repo on GitHub. |
Beta Was this translation helpful? Give feedback.
-
I found this article titled A Brief History of Strings. It does a good job of describing the differences between the various strings types supported by Pascal. One big benefit of AnsiString is that it maintains the terminating NUL char at the end of the string making a conversion to PChar immediate. The earlier ShortString does not maintain a terminating NUL char at the end of the string; ShortString stores the length of the string in the first array location followed by the string itself. I have also read, but have to confirm, that the later versions of Delphi use AnsiString as the implementation of the data type String. If this is the case, then we get automatic conversation from String to PCHAR without re-allocation nor copying of the string data. So perhaps, the early conversion to AnsiString was not needed because now Delphi is perhaps using the AnsiString as the String implementation. I would also have to check on Lazarus's implementation of String to see if it uses the same convention. From Delphi's webpage: https://docwiki.embarcadero.com/RADStudio/Sydney/en/String_Types_(Delphi)
|
Beta Was this translation helpful? Give feedback.
-
I noticed that several authors have added ANSI character support. I'd like to understand why this was done.
What feature(s) use or require ANSI character support?
Does this support need to be carried forward?
We can include prior authors in this discussion after they have joined this project as collaborators. Otherwise, I'll send an email to them directly.
Beta Was this translation helpful? Give feedback.
All reactions