[fpc-pascal] Proper way to cast dynamic array in watch window?

Jim Leonard trixter at oldskool.org
Sun Nov 10 06:57:33 CET 2013

Using the FPC console IDE.  When I define a typed array with limits, ie.:

   tbarray=array[0..1023] of byte;

...I can view the contents of in the watch window (like "foo[2]") 
without problems.  But if I define it as a dynamic array:

   tbarray=array of byte;

...then trying to view the array ("foo[2]") in the watch window shows up 
as "Cannot perform pointer math on incomplete types, try casting to a 
known type, or void *".  I've tried casting like byte(foo[2]) and 
byte^(foo[2]) but I must be doing it wrong as those aren't working.

What is the proper way to cast dynamic arrays so that I can inspect them 
in the watch window?
Jim Leonard (trixter at oldskool.org)
Check out some trippy MindCandy: http://www.mindcandydvd.com/
A child borne of the home computer wars: http://trixter.oldskool.org/
You're all insane and trying to steal my magic bag!

More information about the fpc-pascal mailing list