Re: Is there ever a case where two consecutive commas in not an error?
- To: mathgroup at smc.vnet.net
- Subject: [mg130266] Re: Is there ever a case where two consecutive commas in not an error?
- From: "djmpark" <djmpark at comcast.net>
- Date: Sun, 31 Mar 2013 03:10:10 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <329918.4054.1364630869571.JavaMail.root@m06>
Craig, As it stands now there is nothing that prevents a programmer from using successive commas as a valid expression. {a, b, , c} I use this as a shortcut method for representing ellipsis sequences in Presentations. << Presentations` iSum[a[i], {i, 1, 2, , n}] a[1] + a[2] + \[CenterEllipsis] + a[n] iSum[a[i], {i, 1, 2, , k, Null}] a[1] + a[2] + \[CenterEllipsis] +a[k] + \[CenterEllipsis] (Except here the FullForm output is actually in an iSum wrapper and some manipulation can be done on the expression, or it can be converted to a normal Sum. Special measures have to be taken to make certain the terms are not reordered or combined.) Perhaps Null is not the best choice here, but it is the easiest and most natural method for entering such expressions. David Park djmpark at comcast.net http://home.comcast.net/~djmpark/index.html From: W Craig Carter [mailto:ccarter at MIT.EDU] Hello, I am wondering if there is ever a case where ",," is not an error. For example, I make syntax errors like this: Plot[x,{x,0,1},ImageSize->Large,BaseStyle->Large,PlotRange->{All,{0,2}},,Plo tLabel->"label",Epilog->Line[{{0,0},{1,.5}}]] very often, and searching for them would be easier with highlighting. If ",," is never not an error, shouldn't it be a candidate for error syntax highlighting? (or, If ",," is always an error, it should be a candidate for error syntax highlighting) Craig Carter