MathGroup Archive 2007

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

Search the Archive

Re: Scalars Instead of Lists with One Element

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83467] Re: Scalars Instead of Lists with One Element
  • From: Matthew Fairtlough <matthew at fairtlough.net>
  • Date: Wed, 21 Nov 2007 02:49:47 -0500 (EST)
  • References: <fhu75c$72j$1@smc.vnet.net>

I don't get {2} when I calculate {2,7}[[1]], I get just 2, and this is 
the documented behaviour.  Could it be that the tables you have 
constructed are not quite as you think?  Try FullForm if you are not sure.

Matthew.

In[7]:= x = {2, 7}
x[[1]]

Out[7]= {2, 7}

Out[8]= 2

Gregory Lypny wrote:
> Hello everyone,
> 
> Say I have the list x={2, 7}.  Is there a command I can use to get 2  
> rather than {2} when I ask for x[[1]], and 7 rather than {7} when I  
> ask for x[[2]]?  Doing so would solve my problem with my tables being  
> too deep to be able to cut and paste directly into the table objects  
> of other applications like word processors and spread sheets.
> 
> Regards,
> 
> 	Gregory
> 


  • Prev by Date: RE: old help browser in V6
  • Next by Date: Re: Scalars Instead of Lists with One Element
  • Previous by thread: Re: Scalars Instead of Lists with One Element
  • Next by thread: Re: Scalars Instead of Lists with One Element