Re: Retrieving orphaned code
- To: mathgroup at smc.vnet.net
- Subject: [mg109078] Re: Retrieving orphaned code
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Mon, 12 Apr 2010 06:56:21 -0400 (EDT)
f[a_, b_, c_, x_] := Module[{d, e, f}, d = a + b/2; e = Exp[-c*x]; d*x^2 + e*x + c] DownValues[f] // InputForm {HoldPattern[f[a_, b_, c_, x_]] :> Module[{d, e, f}, d = a + b/2; e = Exp[(-c)*x]; d*x^2 + e*x + c]} However, other Values could have been defined so n = ToExpression[Names["*Values"]] {DefaultValues,DownValues,DynamicModuleValues,FormatValues, NValues,OwnValues,SingularValues,SubValues,UpValues} Select[{#, #[f]} & /@ n, FreeQ[#[[2]], #[[1]]] &] // Quiet Bob Hanlon ---- Michael Young <michaelcharlesyoung at earthlink.net> wrote: ============= Hello, I seem to have accidentally 'orphaned' three functions i built . That is, the code is still active in memory, and the function name shows in black and displays its intended data ; however, the file's copies of the functions' source-code have been modified and recompiled under different names, for different purposes . Is there a way to retrieve function source-code in Mathematica ? Michael