Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Misc > Re: size proble...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 7 Topic 714 of 818
Post > Topic >>

Re: size problems when casting integer onto set in gpc

by "southwesthustla" <fdkelly@[EMAIL PROTECTED] > Jan 30, 2007 at 07:46 AM

>
> I think you should write what you really want to do.  If you want
> copy content of a set to an array of 16-bit integers (or back) you
> can use Move builtin routine.

That's exactly what I want to do. The move command seems to work and 
so I have managed to create an array of 16-bit integers sized at 14-
bytes total. The problem still arises however, when I try to cast/
write this array onto a 112-element set. Firstly due to the set being 
worth 16 bytes in 32-bit gpc. Secondly as the two items are not the 
same 'shape' in memory I get a crash on execution.

I have tried re-sizing the array of 16 bit integers to have an extra 
'blank' row, to bring its size up to 16 bytes. This removes the 'cast 
to type of different size' warning. However still crashes with 
segmentation errors on running, perhaps due to memory "beyond 
allocated size" as you say.

Generally, what determines the size/shape of memory allocated for a 
set or an array?

Concerning crash: accessing memory
> beyond allocated size is likely to cause crash (in newer gpc versions
> most such cases should be caught by range checking).

Do you happen to know which 'newer' gpc version will work smoothly in 
conjunction with gcc?


Thanks again
 




 7 Posts in Topic:
size problems when casting integer onto set in gpc
"southwesthustla&quo  2007-01-26 05:39:02 
Re: size problems when casting integer onto set in gpc
"southwesthustla&quo  2007-01-26 05:43:12 
Re: size problems when casting integer onto set in gpc
Jonas Maebe <Jonas.Mae  2007-01-26 14:44:02 
Re: size problems when casting integer onto set in gpc
Waldek Hebisch <hebisc  2007-01-26 14:57:43 
Re: size problems when casting integer onto set in gpc
"southwesthustla&quo  2007-01-30 07:46:34 
Re: size problems when casting integer onto set in gpc
Waldek Hebisch <hebisc  2007-01-30 18:16:00 
Re: size problems when casting integer onto set in gpc
"southwesthustla&quo  2007-01-31 06:13:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 7 16:17:36 CDT 2008.