MathGroup Archive 2006

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

Search the Archive

Re: Null's not null?

  • To: mathgroup at
  • Subject: [mg69415] Re: [mg69393] Null's not null?
  • From: Igor Antonio <igora at>
  • Date: Mon, 11 Sep 2006 05:39:18 -0400 (EDT)
  • Organization: Wolfram Research, Inc.
  • References: <>
  • Reply-to: igora at

AES wrote:
> Putting Null into one or more slots in a Table and printing the Table 
> shows "Null" (without quotes) at the corresponding positions, as also 
> does ToString[Null].  I don't think that's what the Help message says:
>       "Null is a symbol used to indicate the absence of an 
>        expression or a result. When it appears as an output 
>        expression, no output is printed."
> I can use a string with a couple of empty spaces ("__") to represent an 
> occupied but not empty slot in a Table, but that just looks clumsy to 
> me.  Is there a truly non-printing Null symbol?

The help message is correct.  Here's an example:

In[1]:= f[x_] := Null

In[2]:= f[1]

<nothing was returning.  no output cell.>

In[3]:= f[5] // InputForm



In the example you mentioned, Null isn't the output of Table.  Table 
returns a list:

In[6]:= Table[, {i, 0}]

Out[6]= {}

You could use the empty string (""), which won't take up space and won't 
be displayed in standardform.

In[7]:= Table["", {i, 5}]

Out[7]= {"", "", "", "", ""}

In[8]:= Table["", {i, 5}] // InputForm


{"", "", "", "", ""}


PS: Null and "Null" are not the same thing.  One case would be when 
working with string matching.

Igor C. Antonio
Wolfram Research, Inc.

To email me personally, remove the dash.

  • Prev by Date: Re: Null's not null?
  • Next by Date: RE: Why does Simplify often get stuck?
  • Previous by thread: Re: Null's not null?
  • Next by thread: Re: Null's not null?