Re: array
From: Perry Way (no.delphipro.spam_at_no.spam.earthlink.net)
Date: 10/13/03
- Next message: Kurt Barthelmess: "Re: application.createform problem"
- Previous message: Kurt Barthelmess: "Re: General questions"
- In reply to: Rudy Velthuis (TeamB): "Re: array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 13 Oct 2003 13:33:16 -0700
> > Hello,
> >
> > I have TScanline32 = array[0..0] of TRGBQUAD;
> >
> > what is the range here? I know something like array[0..9] but not
> > [0..0]
>
> It is an array of one TRGBQUAD. Such definitions are usually used for
> (pointers to) variable size arrays. I prefer to declare something a lot
> bigger, and then use a *pointer* to that:
>
> PMyScanLine = ^TMyScanLine;
> TMyScanLine = array[0..65535] of TRGBQuad;
THANK YOU RUDY!
I'm not sure if I should be tagging my name to this post because after
reading another post you've referenced similarly, on this same thread, I am
here doing the slap against my forehead kind of thing saying "I coulda had a
V8"... and I'm supposed to know this stuff.. right? ;)
I had been looking for this very simple cure to a situation wherein I had no
way to know the exact number of bytes that I was reading for each segment of
a datastream until a "switch" occurs in the stream that I am reading in
real-time and only once.. (this about a month ago) when having developed a
major 30 minutes of turrets syndrome due to memory failure (mine) I decided
to get subjective and use a PChar instead so I could "dynamically" position
myself in the stream... but now I see how I could still work with the native
types... Ahhhh I coulda had a V8 and used a heck of a lot less pointer
repositioning...
Anyway back to this dynamic element of these two types of "hacks"
referenced.. I think this one is objectively better. I agree.
PW
- Next message: Kurt Barthelmess: "Re: application.createform problem"
- Previous message: Kurt Barthelmess: "Re: General questions"
- In reply to: Rudy Velthuis (TeamB): "Re: array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|