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 2004

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

Search the Archive

Re: Simple Module Code

  • To: mathgroup at
  • Subject: [mg49538] Re: Simple Module Code
  • From: Jens-Peer Kuska <kuska at>
  • Date: Fri, 23 Jul 2004 05:59:26 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <cdnppf$l2s$>
  • Reply-to: kuska at
  • Sender: owner-wri-mathgroup at


your function arguments are evaluate and the variable
names of the arguemtns are lost during the evaluation
You have just to set the attribute HoldAll to the splitData[]


Doug wrote:
> Does anyone know why the following code would not work inside a module?
> list = AppendTo[list, data];
> here's the exact code
> splitData[data_, list_, i_] := Module[{},
> Print["In Split Data ", i];
> If[data[[i,1]]==1, list = AppendTo[list, data[[i, 2]]]];
> Print["Length of list is: ", Length[list]];
> ]
> which is called by:
> Do[splitData[data, list, i], {i, 1, Length[data]}]
> It complains about to many recursions, yet on the command line alone,
> list = AppendTo[list, data];
> works just fine?
> Thanks
> Doug

  • Prev by Date: Re: Combining vectors to form a matrix
  • Next by Date: Re: Simple Module Code
  • Previous by thread: Re: Simple Module Code
  • Next by thread: Re: Simple Module Code