Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: argument passing

  • To: mathgroup at
  • Subject: [mg14146] Re: [mg14110] argument passing
  • From: "Jens-Peer Kuska" <kuska at>
  • Date: Mon, 28 Sep 1998 18:57:13 -0400
  • Sender: owner-wri-mathgroup at


if You give the function the attribute HoldFirst or HoldAll the
arguments are not evaluated and so the list mylist is not expanded to
its value {1,2,3,..}
As an example


will  not create a copy of the value of l.

Hope that helps
-----Original Message-----
From: Morten N. Aasnes <mortena at> To:
mathgroup at
Subject: [mg14146] [mg14110] argument passing

>How does mathematica pass arguments to functions? If I have a realy
>large list, and make a function to take a list as argument, and return
>a certain element, will the list given as argument be copied when the
>function is called, and if so, how do I avoid this?
>thanks in advance.
>Morten Nygaard Aasnes     mortena at       "Nothing's the same
>anymore" Fantoft Stud.By A626,     (+47)55276131            -Sinclair
>in b5:"Chrysalis" N-5036 FANTOFT, NORWAY

  • Prev by Date: Re: Field of Functions
  • Next by Date: Re: Compiled programs
  • Previous by thread: argument passing
  • Next by thread: Conditionals ("If") and definitions for 3D plots