Anvil | Smiths Smiths | Register Register | Login Login |
Search:
Show links Show tools Show tree | Previous document Next document | njet.org > Anvil > Documentation > Language reference > Expressions > Has operator

Has operator

Has operator checks if an argument has a given method declared. There is the callback method ``_has(methodName)´´ for classes. If the expression is given on the right side, it is evaluated to string.

If ``has´´ is followed by ``!´´ then the meaning of expression is negated. Read as "x has NOT y".

  has-expr := expr "has" ["!"] symbolname 
  has-expr := expr "has" ["!"] "(" expr ")" 
See also  | Expressions  | Grammar
Contributes notes:
Add a note
What's new | Anvil