basic issue with do and :=
- To: mathgroup at smc.vnet.net
- Subject: [mg60402] basic issue with do and :=
- From: "David" <isolanoster at gmail.com>
- Date: Thu, 15 Sep 2005 05:16:22 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi all, this works as (I) expected ------------------------- Do[a[i] = i, {i, 10}] Do[b[i] =a[i]+1, {i, 10}] ------------------------- While this doesn't: -------------------------- Do[a[i] = i, {i, 10}] Do[b[i] :=a[i]+1, {i, 10}] --------------------------- [note ":=" instead of "=" on the second line]. namely the output is: "b[2]:=a[i]+1" for all i Is there any compact way to define: "b[i] :=a[i]+1" for all i ? Thank you in advance, David
- Follow-Ups:
- Re: basic issue with do and :=
- From: "benshimo@bgumail.bgu.ac.il" <bsyehuda@gmail.com>
- Re: basic issue with do and :=
- From: János <janos.lobb@yale.edu>
- Re: basic issue with do and :=
- From: "W. Craig Carter" <ccarter@mit.edu>
- Re: basic issue with do and :=