Re: Instructions in for
- To: mathgroup at smc.vnet.net
- Subject: [mg89403] Re: [mg89371] Instructions in for
- From: "W_Craig Carter" <ccarter at mit.edu>
- Date: Sun, 8 Jun 2008 02:34:02 -0400 (EDT)
- References: <200806070659.CAA09938@smc.vnet.net>
Hello Alejandra, On Sat, Jun 7, 2008 at 2:59 AM, Alejandra Lozada <alozih at gmail.com> > QUESTION: how to introduce many instructions in for? Here is an example that shows the use of semicolons. For[ i=1, i<20, i++, Print[i]; Print[i^2]; d= FactorInteger[i]; Print[Length[d]] ] Generally, you will get more flexible and faster code if you use Map, Table, and Through type constructs rather than For. -- W. Craig Carter
- References:
- Instructions in for
- From: "Alejandra Lozada" <alozih@gmail.com>
- Instructions in for