[fpc-devel] strings: a proposeal

peter green plugwash at P10Link.net
Sun Feb 4 01:23:08 CET 2007



> -----Original Message-----
> From: fpc-devel-bounces at lists.freepascal.org
> [mailto:fpc-devel-bounces at lists.freepascal.org]On Behalf Of Daniƫl
> Mantione
> Sent: 04 February 2007 00:09
> To: FPC developers' list
> Subject: Re: [fpc-devel] strings: a proposeal
> 
> 
> 
> 
> Op Sun, 4 Feb 2007, schreef peter green:
> 
> > my proposal is a statement like
> > 
> > type
> >   tmystring=string(elementtype,allocator,deallocator,copier,uniquer);
> 
> And how should you generate debug information for such a user defined 
> string?
if we require user defined string types to keep the conventions that the underlying pointer points to the first character (with metadata at negative offsets) and that there is a null after the last character in memory then at least for simple element types debugging tools should be able to handle them in the same way they currently do (by treating them as C strings).

from a low level perspective such a string is just a pointer to an array plus some compiler magic just like current ansistrings, debugging tools shouldn't need to be aware of the magic any more than they need to be aware of it for current ansistrings.







More information about the fpc-devel mailing list