[fpc-devel] dominant short strings in compiler source

L505 fpc505 at z505.com
Wed May 17 20:19:42 CEST 2006


> > What do you guys thing about the idea to implement what DEC Pascal
> > and Extended Pascal
> > have - a 2 byte length ShortString (MediumString?), uprdade *some*
> > of the path related
> > ShortStrings to be MediumString[1000] instead of ShortString[255].
> > For some situations
> > it would probably fix some problems immediately just by upgrading
> > to string[1000] or
> > even string[500].
>
> There is the basis of a "longstring" type in the compiler which does
> that more or less, but it was never fully implemented, because nobody
> cares/cared about it. And you'd still have to convert these
> longstrings to ansistrings and back every time you interface with
> sysutils, which would introduce extra overhead.

We wouldn't have to use sysutils yet.. we could make a custom Dos unit 
which used "longstrings" instead of short strings, but keep the old 
Dos unit for compatibility..

i.e. go in to the dos unit and simply change all the short strings to a "longstring" but
back up the original copy of dos unit.. then we would still not have to use Sysutils for
the compiler, just a longstring based Dos unit..
In fact, not all the shortstrings would have to be changed to long strings. Just some
path related ones.




More information about the fpc-devel mailing list