MathGroup Archive 2005

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

Search the Archive

Re: Zero argument functions

  • To: mathgroup at
  • Subject: [mg61743] Re: [mg61686] Zero argument functions
  • From: Ken Levasseur <klevasseur at>
  • Date: Fri, 28 Oct 2005 03:25:22 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

The obvious advantage to the  myFunc[]:=(whatever) construction is  
that it is possible to expand the function to include argument or  
options at a later time.  With the myFunc:=(whatever) that would not  
be possible since  myFunc[x_]:=(anotherwhatever) would evaluate to   


On Oct 26, 2005, at 1:01 AM, kalymereau at wrote:

> Hi
> For a "function" with no argument, what is the difference between:
> myFunc:=(whatever)
> and
> myFunc[]:=(whatever)
> I find the first syntax simpler, but there are many built-in
> Mathematica functions that use the second one.
> Thanks

Ken Levasseur

Please avoid sending me Word or PowerPoint attachments.

  • Prev by Date: Re: Integrate vs Nintegrate for impulsive functions
  • Next by Date: Re: tensor product
  • Previous by thread: Zero argument functions
  • Next by thread: Re: Zero argument functions