Hello, Thank you for the advice and it worked fine for enum type. We have many recordS and other structures and we have created a big database using these structures using BP. We have now problems in accesing this database, as lot of misalignments are resulting as we move from BP to GPC. we have problem in declaring all the records and arrays as 'PACKED' , Bcoz they are countless in number. Instead we used '--pack-struct' option. But this is resulting in an compilation error "Cannot take address of bit feild". Could you advise us on this . Thanks and Regards hari
Frank Heckenbach wrote:
KOCHERALKOTA harikrishna wrote:
How can we set size of enumerated data type in GPC?.
That's not possible currently. Your best bet probably is using an integer type, e.g. `Cardinal (n)' (where n is the desired size in bits), and declaring the enum values as constants (starting from 0).
Because in GPC, even if we give 2 values (0..1) also, it assigns 4 bytes by default.
Yes (for alignment and efficiency reasons), and 1 bit in a packed record/array.
Frank
-- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html