5
$\begingroup$

When using ?? I get the results which the context included. While technically accurate it makes the code difficult to read.

The following

Test[] := Module[{fi,fia,fib,fic,max}, 
            max=4;
            fi=FractionalIteration[f,n,z,0,max];
            fia=fi /. n->a;
            fib=fi /. n->b;
            fic=fi /. n->(a+b);
            Series[(fia /. z->fib)-fic,{z,0,max}]
        ];

becomes

Test[] := 
 Module[{FractionalIteration`Private`fi, 
   FractionalIteration`Private`fia, FractionalIteration`Private`fib, 
   FractionalIteration`Private`fic, FractionalIteration`Private`max}, 
  FractionalIteration`Private`max = 4; 
  FractionalIteration`Private`fi = 
   FractionalIteration[FractionalIteration`Private`f, 
    FractionalIteration`Private`n, FractionalIteration`Private`z, 0, 
    FractionalIteration`Private`max]; 
  FractionalIteration`Private`fia = 
   FractionalIteration`Private`fi /. 
    FractionalIteration`Private`n -> FractionalIteration`Private`a; 
  FractionalIteration`Private`fib = 
   FractionalIteration`Private`fi /. 
    FractionalIteration`Private`n -> FractionalIteration`Private`b; 
  FractionalIteration`Private`fic = 
   FractionalIteration`Private`fi /. 
    FractionalIteration`Private`n -> 
     FractionalIteration`Private`a + FractionalIteration`Private`b; 
  Series[(FractionalIteration`Private`fia /. 
      FractionalIteration`Private`z -> 
       FractionalIteration`Private`fib) - 
    FractionalIteration`Private`fic, {FractionalIteration`Private`z, 
    0, FractionalIteration`Private`max}]]

How can I get messages without the contexts?

$\endgroup$
1
  • 1
    $\begingroup$ I recommend to use GeneralUtilities`PrintDefinitions or GeneralUtilities`PrintDefinitionsLocal to replace ?? $\endgroup$
    – yode
    Commented Sep 3, 2022 at 6:02

1 Answer 1

6
$\begingroup$

Set

Internal`$ContextMarks = False;

will resolve the problem. (The default value of Internal`$ContextMarks is Automatic BTW. ) You may refer to the following post for more powerful tools:

What is the most convenient way to read definitions of in-memory symbols when we don't have the source files? (Spelunking tools)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.