From: Michael Young on
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

From: Albert Retey on
Hi,

>
>
> 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 ?
>

If they are not ReadProtected it is easy:

Information[functionname]

If you don't use UpValues or SubValues, this will also give the function
definitions:

DownValues[functionname]


hth,

albert

From: M.Roellig on
On Apr 11, 10:33 am, Michael Young <michaelcharlesyo...(a)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

??nameOfRoutine prints the source code

Markus

From: Bill Rowe on
On 4/11/10 at 4:33 AM, michaelcharlesyoung(a)earthlink.net (Michael
Young) wrote:

>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 ?

Perhaps doing ??funcname will do the trick for you.


From: Michael Stern on
??functionName


On Apr 11, 2010, at 4:33 AM, Michael Young 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
>