[simpits-tech] OT: Delphi Record problems

Chris Woodul simpits-tech@simpits.org
Sat, 21 Dec 2002 10:30:34 -0600


Man I am a hardware guy...this ones and zeros stuff makes my head
hurt.................GLAD THERE ARE THOSE OF YOU WHO KNOW THIS
STUFF!!!!!!!!!!!!!!

----- Original Message -----
From: "Stig Joergensen" <stig.joergensen@clearsky.dk>
To: <simpits-tech@simpits.org>
Sent: Saturday, December 21, 2002 9:51 AM
Subject: [simpits-tech] OT: Delphi Record problems


> Sorry for the OT, but i have a problem i Delphi, and some of you might
> know the answer
>
>
>
>
> I have a problem with record that i for the life of me can not get a
> handle on:
>
> say i have a file that are organized like this
>
>
> 0000000100000001abcdefgh0000000311111111222222223333333300000000........
> .
>
>
>
> i have create a record that match the above
>
> TMYRec = packed record
>   type : integer;
>   size : integer;
>   name : array[0..7] of char
>   count : integer;
>   numbers : array of integer
>   state : integer;
> ...
> ...
> ...
> end;
>
> myrec : TMyRec;
>
> so i set the size of "numbers" to the "count", one would hope that the
> sizeof(MyRec) would reflect the change, but this is not the case, which
> leaves me to beleave that the "numbers" is just a pointer....
>
> any idea how i can expand the "numbers" at runtime to reflect the
> content of the file?
>
> /Stig
>
>
>
> ------------------------ Yahoo! Groups Sponsor ---------------------~-->
> Get 128 Bit SSL Encryption!
> http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/i7folB/TM
> ---------------------------------------------------------------------~->
>
> The Delphi Collection Web Site!
> http://www.delphicollection.com/public/index.shtml
> ---------------------------------------------------------------
> Unsubscribe:delphi-programming-unsubscribe@yahoogroups.com
> List owner:delphi-programming-owner@yahoogroups.com
> ---------------------------------------------------------------
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
> _______________________________________________
> Simpits-tech mailing list
> Simpits-tech@simpits.org
> http://www.simpits.org/mailman/listinfo/simpits-tech
> To unsubscribe, please see the instructions at the bottom of the above
page.  Thanks!
>