2
$\begingroup$

I found a package Pack that has this structure:

ClearAll["Pack2`*"];  
BeginPackage[ "Pack2`"]
...
Begin["`Private`"];
...
End[]
Protected["Pack2`"];
EndPackage[]

What does Protected["Pack2`"]; do at the whole package? I read here, but it didn't help me.

$\endgroup$
  • 4
    $\begingroup$ Protected["Pack2`"]; does nothing. I guess that the author of the package wanted to write Protect["Pack2`*"];, but made a typo. $\endgroup$ – Shadowray Jul 14 '17 at 11:59
  • $\begingroup$ @Shadowray I think that is a guess worth an answer :) $\endgroup$ – Kuba Jul 17 '17 at 13:57
2
$\begingroup$

For the record:

Protected["Pack2`"]; does nothing. I guess that the author of the package wanted to write Protect["Pack2`*"];, but made a typo.

– Shadowray Jul 14 at 11:59

Protect["context`*"] protects all symbols in a particular context.

– ref/Protect

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.