Re: Add syntax highlighting to own command
- To: mathgroup at smc.vnet.net
- Subject: [mg101832] Re: Add syntax highlighting to own command
- From: earthnut at web.de (Bastian Erdnuess)
- Date: Sat, 18 Jul 2009 08:00:26 -0400 (EDT)
- References: <200907090600.CAA17547@smc.vnet.net> <h3766u$f9h$1@smc.vnet.net> <h3s24c$66k$1@smc.vnet.net>
rych <rychphd at gmail.com> wrote: > On Jul 16, 1:19 pm, earth... at web.de (Bastian Erdnuess) wrote: > > Bastian Erdnuess <earth... at web.de> wrote: > > > > > Let /: ( lhs_ := Let[ vars_, expr_ /; cond_ ] ) := > > Let[ vars, lhs := expr /; cond ] > > > > > I'm sorry, Bastian, but can I ask you what you're trying to achieve > with these lines? Actually, I've never seen more than one SetDelayed > in an expression. In the help for With is written - You can use With[ { vars }, body /; cond ] as the right-hand side of a transformation rule with a condition attached. I tried to get the same behaviour to the Let construct. I found out one can write the upper rule also straight as ( lhs_ := Let[ vars_, expr_ /; cond_ ] ) ^:= Let[ vars, lhs := expr /; cond ] as an UpRule. > When I try to test this definition as follows, I get > a "SetDelayed::shape" error, > > {x, y, z, w} := Let[{a = 1, b = a + 1, c = b + 1, d = a + b + c}= > , {a, > b, c, d}] I don't see what you try to do. This shouldn't match any of the rules for Let at all. I get the same error, also when I use a symbol like Foo instead of Let which has no rules attached. Bastian
- References:
- Add syntax highlighting to own command
- From: earthnut@web.de (Bastian Erdnuess)
- Add syntax highlighting to own command