[fpc-devel] dominant short strings in compiler source

L505 fpc505 at z505.com
Tue May 16 21:50:53 CEST 2006


> Are you getting rid of shortstring in general or just short strings
> that are utilized for paths?

>I think it's only the shortstrings for paths that cause problems.

It was a local copy experiment of my own compiler so don't worry I'm not committing to SVN
:-)

Well the problem I saw was that one procedure requires shortstrings and it is linked to
another procedure that requires shortstrings - it's not just one piece of code that runs
the whole Exec() procedure but a bunch of procedures. For example the Exec on Windows is
located in Dos unit, and Dos unit uses shortstrings - not just the compiler core uses
shortstrings, but the RTL which the compiler core relies on uses them. Wouldn't want to
change the Dos unit itself if that was causing problems, since Dos unit must remain
compatible with old Turbopascal Dos unit - if Dos unit was part of the problem a custom
exec procedure would have to be written and Dos unit would not be used for Exec, rather
the custom unit would..

But I still have to verify I've solved exactly all spots where my shortstrings are getting
chopped - whether it is only one place or several combinations of places. I suspect like
Daniel M. says that the problem may be solved simply by increasing the number of strings
being passed (in a list or record structure) instead of cramming them all into one string.




More information about the fpc-devel mailing list