I have a notebook containing (in a Code cell, Initialization Group)
BeginPackage["aPackage`"]; aTestFunction::usage = "aTestFunction usage"; Begin["`Private`"]; (* Remove[aTestFunction]; *) aTestFunction[arg_] := arg + 1; Protect[aTestFunction]; End[]; EndPackage; and further
Needs["aPackage`", NotebookFileName[]]; ?aTestFunction aTestFunction[1] Quit[]; All that honestly earns its pay. But if I de - comment the Remove command, it produces.
Information::notfound: "Symbol aTestFunction not found."
and I can' t realize the reason. All things considered, Remove removes the aTestFunction symbol (provided that it exists) from the aPackage context but should not prevent it from being defined at a later time. It sounds quite different from what one can observe in the Global context: this
Context[] a = 1; Remove[a]; a = 2; a + 1 returns
Global 3 .
