Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: Mysterious Output in formatted Notebook

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104707] Re: Mysterious Output in formatted Notebook
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Sat, 7 Nov 2009 06:49:49 -0500 (EST)
  • References: <hd0ss0$7lq$1@smc.vnet.net>

"John" <jwa0 at lehigh.edu> wrote in message news:hd0ss0$7lq$1 at smc.vnet.net...
> Mathematica 6, xp windows
>
> My notebook is mostly paragraphs of text interspersed with sections
> and subsections, tables, plots and displayed formulas. Students will
> view it in class and later on Mathematica Player. or reason Out
> [integer]=Null^i is printed between paragraphs and headings (section
> or subsection). The exponent i is  usually the number of preceding
> paragraphs.
>
> What is it telling me? What causes it, and how can I get rid of it?
>
> .
>
> John
>

One way this could happen if a module ended with ";". This is an example

In[3]:= foo[] := Module[{i}, i = 1; ]
foo[]^3
Out[4]= Null^3

The return value of the module is the last expression. If there is a ";" at 
the end, then Null is the result!

It could also happen if you have ";" inside an If[] such as

In[6]:= j = If[True, 5; ]
j^3
Out[7]= Null^3

So, search the code for ";" and make sure there is no extra ones laying 
around the code.

(There ought to be a lint-like tool for Mathematica)

--Nasser




  • Prev by Date: Re: SphericalPlot3D ColorFunction problem
  • Next by Date: Re: SphericalPlot3D ColorFunction problem
  • Previous by thread: Mysterious Output in formatted Notebook
  • Next by thread: Re: Mysterious Output in formatted Notebook