MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to work with In?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113972] Re: How to work with In?
  • From: Oliver Ruebenkoenig <ruebenko at wolfram.com>
  • Date: Fri, 19 Nov 2010 06:58:27 -0500 (EST)

On Fri, 19 Nov 2010, kj wrote:

> I want to create a list consisting of the (unevaluated) expressions
> that were entered in a particular subrange of the In array.  I.e.,
> what I want is (almost) something like this:
>
> Table[In[i], {i, 300, 375}]
>
> except that this won't work, because each In[i] will be evaluated.
> This also fails
>
> Table[Hold[In[i]], {i, 300, 375}]
>
> because now the i is not evaluated, so the result is a list of
> multiple copies of the expression Hold[In[i]].
>
> How can I do what I'm trying to do?


I think this is your friend

Table[With[{i = i}, Hold[In[i]]], {i, 300, 375}]

Oliver

>
> TIA!
>
> ~kj
>
>
>


  • Prev by Date: Re: How to specify "arbitrary depth" for a (sub)pattern?
  • Next by Date: Re: How to specify "arbitrary depth" for a (sub)pattern?
  • Previous by thread: How to work with In?
  • Next by thread: Re: How to work with In?