Packing strings ()
ih8mj at fjf.gnu.de
Fri Jul 22 02:09:32 CEST 2005
Contestcen at aol.com wrote:
> The subject of this thread in the GPC mailing list is how to store
> character strings without wasted space. Notive that the subject of this thread is
> "Packing strings ()" That was the subject of the original posting that
> started the thread.
> I have mentioned the Pascal Macro Compiler because it comes with macros
> that have the ability to pack strings without wasted space. That is the
> original question,
Not again please!!! Peter himself made it explicitly clear that he
asked for runtime storage (which was clear to all of us except you
from the beginning).
> I have gone to great lengths to avoid creating any HTML in my postings
> to this mailing list. To avoid HTML-style quoting, I am copying the postings
> myself, and inserting all of those greater-than signs by hand.
As I said, why are you making things so complicated? Use a proper
mailer, and you'll neither have to do qouting by hand, nor
inadvertently send HTML.
> I have tried to stick to the subject, but other people have been
> attacking my postings for all sorts of reasons that I believe are tangential at best,
> such as the use of text compression, hashing, trees and linked lists. I have
> tried to point out that these are separate issues, but I get attacked again
> when I do that.
Because you don't seem to realize that your answer about
compile-time storage is, at best, tangential to the original
question. And again, most people apparently are more interested in
efficient access than minor(!) space savings. You might care for the
latter at the cost o99f the former, but why do you keep posting
about it if nobody else here shares this preference. Use it for
yourself and be happy with it, but don't bother others who don't
like it. We're well aware that this is possible, one way or the
other, but apparently noone here wants to do that.
> I am starting to wonder if this isn't some kind of hazing for the new
> guy, and if I want to join this fraternity then I have to undergo this ritual.
> Or maybe you are just testing me to see if I am worthy to be in this august
Really not. Unfortunately, the main archives are still offline (but
you might be able to find mirrors through Google). There you'll see
that few, if anyone, had so many initial problems. Some did an HTML
posting or strange quoting in their initial mail, but after a
friendly reminder, they changed it. You're probably the first one
who seems to need a majority vote of all list subscribers to
convince you (would 2/3 of all who ever posted to the list be enough
for you, counting abstentions as negative votes? ;-), and constantly
ignores all pointers to standard netiquette (including numerous ones
in private mail, I must add).
> If you need to initialize a character array greater than 255 chars in BP, you
> can resort to using absolute. For example
> Const ch1: array[1..5,1..100] of char
> = ('First 100 chars', 'Second 100 chars', ..., 'Last 100 chars');
> Var ch: array[1..500] of char
> absolute ch1;
That's really non-portable, a BP *only* solution (if at all). If the
compiler aligns the sub-arrays, it can break. Since BP is finished,
you could check all versions and make sure it works on all of them,
but on other compilers, it's a recipe for suicide. And you
mentioned, in another PM, the possibility of using multiple
If you really must do things that exceed the capabilities of an old
compiler, you can try to trick around it. Or you can just use a
newer, better compiler. That's one reason why we develop GPC, BTW.
Frank Heckenbach, frank at g-n-u.de, http://fjf.gnu.de/, 7977168E
GPC To-Do list, latest features, fixed bugs:
GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE D101 CD02 4C9D 0FE0 E5E8
More information about the Gpc