MathGroup Archive 1998

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

Search the Archive

Re: Null in Output Solved?

  • To: mathgroup at
  • Subject: [mg13804] Re: Null in Output Solved?
  • From: "Clemens Frey" <Clemens.Frey at>
  • Date: Fri, 28 Aug 1998 04:18:26 -0400
  • Sender: owner-wri-mathgroup at

-----Urspr|ngliche Nachricht-----
Von: Tom Goetze <TomG at> An: Tom Goetze
<TomG at>; Clemens Frey <Clemens.Frey at>
Datum: Montag, 24. August 1998 23:15 Betreff: Null in Output Solved?

>I previously posted a question about Null in the output from a package.
>Clemens Frey suggested a trap to make this happen of the form:
>f[x_] := Module[
>If[False, NeverExecuted]
>This outputs '2 Null' when loaded from a package and the call to f is made.
>His reasoning is that since the output for 'False' in the 'If' statement is
>defined it results in the 'Null', and the line break is interpreted as a
>(as Mathematica so nicely warns).
>At first I didn't think this was too useful, but indeed it probably was.
>I'm not sure
>of why my new version works, but here is the story.


I think the case you describe is of the following abstract form. First
you define a function

f[x_] := Module[{},Anything;]

in your complexConstraint-function. The semicolon after 'Anything' makes
that f doesnt return anything, namely Null. You can see this by

FullForm[  f[Something]   ]

Then you let Mathematica compute something like

Plus @@ (f[#]& /@ {1,2})

which indeed produces Null+Null being simplified to:

2 Null

meaning in FullForm:


Hope this helped

  • Prev by Date: Looking for Contractor
  • Next by Date: Job query re Mathematica in DC metro area.
  • Previous by thread: Looking for Contractor
  • Next by thread: Job query re Mathematica in DC metro area.