Rick Engebretson wrote:
Frank Heckenbach wrote:
Rick Engebretson wrote:
I now think the difference is due to FPC defines "word" integers as 16 bit. GPC defines "word" integers as 32 bit. I declared the colors as "word" integers in the code. When I wrote the GPC "word" integers to the framebuffer, I got 16 bits of blank "spots". So it does work. Sorry, again my mistake. Looking through older manuals, there seems to be no common integer types between FPC and GPC ??
For interfacing to C in GPC use the C compatible types (see manual). For fixed size types use `Integer attribute (Size = 32)' or `Cardinal attribute (Size = 32)' etc. I don't know what FPC has.
I'm not interfacing to C. I'm rewriting everything in Pascal. Tedious, but well worth it for me.
When interfacing to hardware directly (via memory mapped I/O), the remarks about fixed sizes apply.
Another divergence between FPC and GPC will be FPC:TCollection object or GPC:ConformantArray. The conformant array is far more appropriate to store pixel coordinates, but the only real documentation is the demo program. Still, the learning process is fun and important.
I think (hope) there isn't much more to say about it. Just declare the parameter [const|[protected][var]] Foo: array [m .. n: IndexType] of SomeType and use `Foo', `m' and `n' as expected. If you have more questions, feel free to ask.
Frank