Hi GPC crew, I just got into a new issue in my SUN Pascal to GPC conversion process: In SUN Pascal, one can compare records variables (of the same or compatible type, obviously) with the "=" and "<>" logical operators and obviously enough, ">=" and "<=" cannot be used to compare records, it is meaningless. It looks that GPC does not implement records comparison. The compiler reports: invalid operands to `<>'. I consulted the ISO 10206 Standard but I don't find anything about records comparison in the logical operators section. It looks like a SUN Pascal extension (one more :-() So, is there a way compare records of compatible types without doing it field by field? I know I can create new operators "=" and "<>" but in this case I will have to do it for the 600+ record types of the applications. There must be a better way to do it... In C, a simple memcmp() call could do the job :-( 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? Perhaps I am bothering you with my conversion problems and suggestions, but you already saved me hundreds hours of work. It is invaluable! Thanks and thanks Pascal Viandier pascal@accovia.com
participants (4)
-
Adriaan van Os -
CBFalconer -
Frank Heckenbach -
Pascal Viandier