MathGroup Archive 2009

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

Search the Archive

Length of a held expression

  • To: mathgroup at
  • Subject: [mg96524] Length of a held expression
  • From: Nikolaus Rath <Nikolaus at>
  • Date: Sun, 15 Feb 2009 03:23:23 -0500 (EST)


How can I get the length of a list in a Hold[] expression? I.e. if

 b = Sequence[1,2];

then I want the length of {b,3} given as 2. But


gives me the length after splicing in b (which is 4), while


gives me the length of the hold expression (which is 1).

Anyone able to help?



 =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2=AB

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C

  • Prev by Date: Re: Laplace Transform Exponential Shift
  • Next by Date: Problems about "For"
  • Previous by thread: Re: How to stretch a image
  • Next by thread: Re: Length of a held expression