no legal interpretation for operator "=", use clause on "<package name>" would make operation legal

27
Jan

This error is generally pretty easy to understand. The problem of the "with <package name>;" statement is that it gives you access to all the definitions of <package name>, but only if preceded by the name of the package and a period as in:

    <package name>.<name>

Although you can use the same feature for operators, most people don't do so. In our case, the "=" operator, it would look like this:

    <package name>."=" (left, right);

To be able to write left = right as expected, you want to add a use <package name>; at the top of your package or program. Unfortunately, you will get the usual mix of all the packages that you mark as use. Yet, if you are to use thousand of the overloaded operators, it is definitively worth the trouble.

0
Your rating: None