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

1 Answer 1

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 and acknowledge you have read our privacy policy.

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