Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Joe Riel Newsgroups: comp.soft-sys.math.maple Subject: Re: Question about concatenation =?utf-8?B?4oCcYXx8YuKAnQ==?= in Maple? Date: Wed, 08 Feb 2012 12:52:26 -0800 Organization: A noiseless patient Spider Lines: 21 Message-ID: <87ty31ujxx.fsf@san.rr.com> References: <2c80a9c7-f5c7-4144-8f0a-b4d1d92c1c17@jn12g2000pbb.googlegroups.com> <74fb2a8c-d0dd-444c-bdfd-78eaa5e60857@lr19g2000pbb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx04.eternal-september.org; posting-host="fkgjSOZ+03w83W7QjZBmIg"; logging-data="9049"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+nFI6E45DhlBKoejZhB0uu" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:0Z6JykrRP6xBOGHDDt9ETRPxS4o= sha1:bJN0g/wioKQoEiGux9RoxtC4zS8= Xref: x330-a1.tempe.blueboxinc.net comp.soft-sys.math.maple:363 Rex writes: > Great thanks Adri. Sorry for my typo for "L:=". > > I have one further question. Here's the test code: > > L := [2, 1] > test := proc (i) local a1; a1 := 1; add(a || b*L[i], b = 1 .. > 2) end proc > test(1); > will result > 2 a1 + 2 a2 > without evaluating `a1` which is a local variable defined in function > test. > I expect to get `2*1+2*a2`. The catenation operator generates global variables, not locals. Using indexing if you want to refer to a local by an index. -- Joe Riel