Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.maple > #363

Re: Question about concatenation “a||b” in Maple?

From Joe Riel <joer@san.rr.com>
Newsgroups comp.soft-sys.math.maple
Subject Re: Question about concatenation “a||b” in Maple?
Date 2012-02-08 12:52 -0800
Organization A noiseless patient Spider
Message-ID <87ty31ujxx.fsf@san.rr.com> (permalink)
References <2c80a9c7-f5c7-4144-8f0a-b4d1d92c1c17@jn12g2000pbb.googlegroups.com> <dd07b$4f32934a$82593461$731@news1.tudelft.nl> <74fb2a8c-d0dd-444c-bdfd-78eaa5e60857@lr19g2000pbb.googlegroups.com>

Show all headers | View raw


Rex <aoirex@gmail.com> 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

Back to comp.soft-sys.math.maple | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Question about concatenation “a||b” in Maple? Rex <aoirex@gmail.com> - 2012-02-08 02:53 -0800
  Re: Question about concatenation “a||b” in Maple? "A. van der Meer" <a.w.j.vandermeer@math.utwente.nl> - 2012-02-08 16:22 +0100
    Re: Question about concatenation “a||b” in Maple? Rex <aoirex@gmail.com> - 2012-02-08 10:57 -0800
      Re: Question about concatenation “a||b” in Maple? Joe Riel <joer@san.rr.com> - 2012-02-08 12:52 -0800
        Re: Question about concatenation “a||b” in Maple? Rex <aoirex@gmail.com> - 2012-02-08 14:34 -0800

csiph-web