Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: is there internal variable like $0 in perl?


Ted,

It's not necessary in this case, any references to myFun in the Module 
are scoped to the package aaa already as long as myFun's declaration is 
after the Begin[], which I can't tell since you elided code.

If you are using anonymous functions #0 refers to the function itself 
and can be used for recursive anonymous functions.

Regards,
	Ssezi

On Apr 26, 2012, at 5:27 AM, Ted Sariyski wrote:

> Hi,
>
> When I define a new function myFun in a package aaa` I define a variable
> me="aaa`myFun".
>
> BeginPackage["aaa`"]
> ...
> myFun[]:=Module[{..., me="aaa`myFun"},
> ...
>
> I wonder Is there an automatic variable, like $0 in perl, which
> internally is assigned "aaa`myFun"?
>
> Thanks in advance,
> --Ted
>




  • Prev by Date: Re: is there internal variable like $0 in perl?
  • Next by Date: Re: Coloured strings
  • Previous by thread: is there internal variable like $0 in perl?
  • Next by thread: Re: is there internal variable like $0 in perl?