Duplicate parameter X

Duplicate parameters to methods and predicates are not allowed.

class A extends Type {
  predicate p(int X,int X) { X=3 }
}
If you are a logic programmer, this might look like the definition of a predicate that is true only for the pair (3,3). For consistency with more traditional languages, .QL does not allow such repeated parameters. Instead you write
class A extends Type {
  predicate p(int X,int Y) { X=3 and X=Y }
}
Comments
Only registered users can write comments!
 
< Prev   Next >