Re: Expressions with ellipsis (...)

*To*: mathgroup at smc.vnet.net*Subject*: [mg93345] Re: Expressions with ellipsis (...)*From*: magma <maderri2 at gmail.com>*Date*: Tue, 4 Nov 2008 06:19:35 -0500 (EST)*References*: <gdmsbd$jv$1@smc.vnet.net> <200810240630.CAA23066@smc.vnet.net>

On Nov 2, 7:58 am, AES <sieg... at stanford.edu> wrote: > In article <geh9sa$fb... at smc.vnet.net>, dch888 <dch... at googlemail.com> > wrote: > > > > Another answer is that Mathematica *should* understand the syntax > > > with ellipsis-- and indeed it can with the facilities of David Park's > > > Presentations application package. > > One has to be careful about the use and interpretation of ellipses. > > For example the Mathematica documentation for Compound Expression says > that > > expr_1 ; expr_2 ; =8A > evaluates the expr_i in turn, giving the last one as t= he result. > > Would this statement, interpreted very literally using a precise > definition of the ellipsis symbol, cover both > > expr_1 ; expr_2 ; expr_3 ; expr_4 ; > > and > > expr_1 ; expr_2 ; expr_3 ; expr_4 > > or just one of these? (Which one?) > > _Is there_ a precise definition of the ellipsis symbol? (in English, or > in Mathematica) > > Is " ; " technically an expression? (in Mathematica) The ellipsis symbol has no built-in special meaning in Mathematica. It is used in CompoundExpression documentation in the same way it is used in English. the semicolon ";" is NOT an "expression". It is just the INFIX form of the CompoundExpression operator, exactly like "+" is the infix form of Plus CompoundExpression[a, b, c] is equivalent to typing a;b;c (no semicolon at the end) and WILL display the value of c. Instead typing a;b;c; (semicolon at the end) is equivalent to typing CompoundExpression[a, b, c;Null] and WILL NOT display the value of c. In both cases a, b and c are evaluated. I do not find this "mystical" or complicated in any way. But for most Mathematica users, the semicolon can be simply considered a separator between statements, like similar separators in other languages. Actually, to be more precise, the ";" is a "separator and suppressor of output", while a simple carriage return (the big RETURN key in the keyboard) is the basic separator between statements. You can see this by typing a b in the same cell, one below the other (using carriage return). In this case the evaluations are carried out sequentially and the values are displayed. The sequence of keypressees: a "carriage return" b is not interpreted as ab or as a multiplied by b , but as a and then b So the carriage return is the pure separator of statements. HOWEVER ".." (just 2 dots) HAS a built-in meaning as Repeated[] and you can read what it means in the documentation