Bug in the front end's parser ( lst[[ ;; , 1 ]] syntax)
- To: mathgroup at smc.vnet.net
- Subject: [mg88243] Bug in the front end's parser ( lst[[ ;; , 1 ]] syntax)
- From: Szabolcs Horvát <szhorvat at gmail.com>
- Date: Tue, 29 Apr 2008 06:50:29 -0400 (EDT)
- Organization: University of Bergen
Suppose that we want to take the third element of every sublist from the following list: lst = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}} One way to do this is to use lst[[All, 3]] Another way would be to use the new Span-syntax: lst[[ ;; , 3]] Unfortunately this does not work when evaluated in the front end. It does work when the kernel was started on the command line. (Both of lst[[1;; , 3]] and lst[[;;-1 , 3]] work from the front end.)