Tag Info

New answers tagged

4

I found, in the "Applications" section of the documentation of ClearAll, this authoritative recommendation: Unprotect and clear all symbols in a package, to allow it to be read twice: Begin["`Private`"]; Unprotect["`*"]; ClearAll["`*"]; f[x_] := x^2 Protect[f]; End[]; I don't see this advice in the guide here for Setting up Wolfram Packages, ...


3

When using automatically generated packages I am selective about which Cells I mark for Initialization and therefore transference to the package file. I don't find the need to include ClearAll in such cases. I do use a Unprotect / Protect paring which at least prevents additional definitions from accidentally being made elsewhere. A case where ClearAll ...



Top 50 recent answers are included