Hi,
I understand very well the complexity of comparing records, but the code I must convert to GPC is written in SUN Pascal 4.2 and the manual says clearly that you can test records equality with "<>" and "=". So does the code. Perhaps, the memory used for records is zero-filled at the variable instantiation, I don't know. That's true, SUN Pascal 4.2 has many extensions to the standard Pascal, and the programmers used them, so I hit walls here and there in the conversion process.
To clarify my intents, I must say that my purpose is not - and will never be - to criticize GPC in any way (I admire the project and the product) but to find the best ways to solve my conversion issues with the help of highly knowledgeable people.
And I think I am at the right place for this.
Thank to all of you.
Pascal Viandier pascal@accovia.com
Pascal Viandier wrote:
... snip ...
However, I think this could be a nice and logical feature to have in GPC: Why, if we can assign a record to an other with ":=", cannot we test them for (in)equality afterwards?
This is something that has never been available under any standard Pascal. The reason is that records can have padding and alignment portions with uncontrolled content. So the only way to compare records is with specific code, that examines each field as needed.
The same thing applies to C structures.