add -scope switch
Merge pull request #4197 from WalterBright/scopeswitch

DIP69: add -scope switch