[fpc-pascal] replace one field of a record in a collection...

waldo kitty wkitty42 at windstream.net
Sat Feb 4 03:14:38 CET 2012


On 2/3/2012 05:07, Sven Barth wrote:
> Am 02.02.2012 21:22, schrieb waldo kitty:
>> PSCRec(aSatCatColl^.At(idx))^.satname^ := asatname;
>>
>> the data is changing but i'm suspecting that i need to be doing
>> something more because with the above line in place, i'm getting a lot
>> of errors like the following... i suspect the problem is that the data
>> being replaced is a different length that the replacement data?? if i
>> comment out the above line, my program runs with no errors at all...
>
> What is satname? A pointer to a ShortString or a pointer to a AnsiString? Did
> some other part of your code catch (and cache ^^) a reference to that string?

ummm... the record that contains satname has satname as a type pstring...

i did try converting asatname to pstring but then ran into all kinds of stuff 
that had to be altered and then everything fell apart even worse so i backed out 
of that...

as i've written before, pointer stuff is very alien to me... i'm extremely used 
to working with the old style 64k limitations and where strings were simply 
pascal strings :?

i can post code if needed but i'm not sure what really need to break down into 
small bits for posting :?

there are times that i truly hate not being "college educated" in this stuff but 
i've been at it for 30+ years and it would be a hard row to how at this point in 
time to try to go back and learn it all again... but i am, kinda on that road as 
it is... one of these days i *will* grok it... hopefully sooner than later ;)

should i post (again) the type structures?




More information about the fpc-pascal mailing list