"hidden" definitions
- To: mathgroup at smc.vnet.net
- Subject: [mg5728] "hidden" definitions
- From: murray at math.umass.edu (Murray Eisenberg)
- Date: Sat, 11 Jan 1997 14:29:16 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Is there some way that I can prepare a Notebook with some objects
defined in it (via :=, say: f[x_] := Module[{...}, ...x....]) and save
it, yet when the user opens it in Mathematica, she cannot see what the
definition is although she can use the object so defined?
I tried the obvious thing: making the definition, then setting its
attributes to ReadProtected and Locked. But that doesn't do what's
needed: if I save the notebook and then open it again, of course the
cell showing the definition is right there in bright daylight!
Is including, too, some appropriate use of Encode what it takes and,
if so, how?
The specific application I have is for instructional use -- (1) students
can execute and investigate "mystery" functions; (2) I can provide my
"correct" versions of Mathematica programs against which students can
test their own versions for giving the correct results. (Evidently I
cannot let them see my versions here.)
A solution that works for Mathematica 2.2 as well as 3.0 would be
highly preferable.
--
Murray Eisenberg Internet: murray at math.umass.edu
Mathematics & Statistics Dept. Voice: 413-545-2859 (W)
University of Massachusetts 413-549-1020 (H)
Amherst, MA 01003 Fax: 413-545-1801