MathGroup Archive 2008

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

Search the Archive

Part ([[...]]) and span (;;)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84599] Part ([[...]]) and span (;;)
  • From: nigol <dario.buttari at gmail.com>
  • Date: Sun, 6 Jan 2008 05:57:11 -0500 (EST)

In the Mathematica 6 help is written:
   Common spans of parts include:
   expr[[;;,j]]           column j
   If any of the Subscript[list, i] are All or ;;, all parts at that
level are kept.

On my platform the following works:
In[1]:= {{a, b, c}, {d, e, f}, {g, h, i}}[[All, 2]]
Out[1]= {b, e, h}

but the following does not work:
{{a, b, c}, {d, e, f}, {g, h, i}}[[;; , 2]]
Syntax::sntxf: ";;" cannot be followed by ",2".
Syntax::tsntxi: ",2" is incomplete; more input is needed.
Syntax::sntxi: Incomplete expression; more input is needed.

In[2]:= $Version
Out[2]= "6.0 for Microsoft Windows (32-bit) (June 19, 2007)"

Is this problem common to other platforms?
Thanks,
Dario


  • Prev by Date: Re: Setting Colours of Plots
  • Next by Date: Re: symbolic Variance - Integration
  • Previous by thread: Code or algorithm that selects tickets in turn in Mathematica software.
  • Next by thread: Re: Part ([[...]]) and span (;;)