MathGroup Archive 2005

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

Search the Archive

Re: Module command acting funny...

  • To: mathgroup at
  • Subject: [mg58268] Re: Module command acting funny...
  • From: Peter Pein <petsie at>
  • Date: Sat, 25 Jun 2005 01:56:26 -0400 (EDT)
  • References: <d9gb7c$svs$>
  • Sender: owner-wri-mathgroup at

plizak schrieb:
> computeIndividualCDOPLB[ filteredTimes ] := Module[
>    {i},
>    Print[ "computing IndividualCDOPLB"];
> ];
> mathcode(A1:A6), result is NULL (which means no errors).
> But when I call this module, it doesn't run (i.e. the output is not
> printed.
> When I remove the semicolon at the end of the print statement, it
> works!  Until I recompile it again and then it doesn't work until I add
> the semicolon back in.  I then just kept the semicolon in and changed
> the text to print (adding spaces), and it won't run the first time,
> only after I've modified it will it run.
> Any idea why this is the case?  I don't want my end users having to
> modify the code sheets after linking to mathematica.
> I normally would have more code in this module, but I stripped it all
> out and it still acts funny.
> Any ideas why this is the case?  Am I using Module[ ] properly?  Should
> I use Block[ ] or With[ ] instead?   Maybe another technique?
> Thanks,
> Peter
Hi Peter,
you forgot the Blank:

In[1]:=computeIndividualCDOPLB[filteredTimes] :=
   Module[{i}, Print["computing IndividualCDOPLB"]; ];

computeIndividualCDOPLB[withAnArgument_] :=
   Module[{i}, Print["computing IndividualCDOPLB"]; ];

From In[4]:="computing IndividualCDOPLB"

Peter Pein

  • Prev by Date: Re: Numerical solution of quadratic equations set.
  • Next by Date: Re: free packages
  • Previous by thread: Re: Module command acting funny...
  • Next by thread: Re: Module command acting funny...