> 1. If a segment is deleted from an ansistring, e.g. ... > > s := 'abcdefghijklmnop'; > delete (s, 5, 6); > > yielding s = 'abcdelmnop' > > ...does the system "shift" the 'lmnop' to the left, or does the string > get hooked together with pointers, thus saving much time with long strings?
No shifting, ansistrings are not sparse (at least not in this implementation. Note that sparse strings save time with this kind of operations, but cost quite some extra time when parsing them. > 2. Is there any documentation yet of the ansistring internals? If not, > what file contains the source? I don't know, but the file is inc/astrings.inc Maybe there are some asm parts in <processor>.inc too The idea is quite simple. Ansistrings essentially are pchars, with alloocation size, length and reference count prefixed on negative offsets of variable^. The fact that it has the length, also means that it can contain any character. _______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal