Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Function as an argument

  • To: mathgroup at smc.vnet.net
  • Subject: [mg76755] Re: [mg76625] Function as an argument
  • From: "Patrick Scheibe" <mai99dnn at studserv.uni-leipzig.de>
  • Date: Sat, 26 May 2007 04:54:38 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <200705251020.GAA06125@smc.vnet.net>

This is because expression[2] is a call to a function and you have given  
an expression..

MyFunction[2 + #^3 &]

works fine.

Cheers
Patrick

Am 25.05.2007, 12:20 Uhr, schrieb dXdYdZdu <dxdydzdu at gmail.com>:

> ss[x_] = 2 + x^3 ;
> MyFunction[expression_] := Module[{}, Return[expression[2]]]



-- 
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/


  • Prev by Date: Style Sheets in Version 6.0
  • Next by Date: wrong limit ?
  • Previous by thread: Re: Function as an argument
  • Next by thread: Re: Function as an argument