CBFalconer wrote:
I'm glad they chose the other route. Makes type-checking quite a bit easier and, more importantly, possible at compile-time, even in such complex situations.
PascalP (out of P4) took the compatible components route, and it was quite a simple recursive function, something like:
IF primitive THEN compatible := (t1 = t2) AND (t1.lim = t2.lim) ELSE IF arrt THEN compatible := compatible(t1.ixt, t2.ixt) AND compatible(t1.ct, t2.ct) ELSE IF rect THEN ...
Yes, but if you apply this to dynamic types (conformant arrays, schemata, arrays declared with non-constant bounds), it will require runtime checks. Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: 51FF C1F0 1A77 C6C2 4482 4DDC 117A 9773 7F88 1707