In a contract where a modifier like this would be reused a lot, is ID inherited by the function that uses the modifier? If not, this check would need to be in the function. If yes, is there any drawbacks from putting uint ID in the modifier?

modifier isMember (address _foo) {
  uint ID = memberIndex[_foo];
  require(ID != 0); 

No, a function cannot access the variables in the modifier.

The compiler will show an error

DeclarationError: Undeclared identifier.
        uint b = ID;

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .