Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2009

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

Search the Archive

Re: Re: RandomReal gets stuck

  • To: mathgroup at
  • Subject: [mg100535] Re: [mg100528] Re: RandomReal gets stuck
  • From: DrMajorBob <btreat1 at>
  • Date: Sun, 7 Jun 2009 05:01:21 -0400 (EDT)
  • References: <>
  • Reply-to: drmajorbob at

If you want to use subscripted variables, it might help to use this code:

subFunction::usage = "subFunction[a] causes inputting a[i] or \
\!\(\*SubscriptBox[\"a\", \"i\"]\) to be synonymous, while always \
displaying the latter in outputs."

"subFunction[a] causes inputting a[i] or \!\(\*SubscriptBox[\"a\", \
\"i\"]\) to be synonymous, while always displaying the latter in \


The result is that you can refer to a[i] or Subscript[a,i]  
interchangeably, but it always displays in the subscripted form. I find it  
much easier to use a[i] while typing formulas, so I'm getting the best of  
both worlds.

Not sure if that addresses everything brought up on the thread, of course.


On Sat, 06 Jun 2009 05:25:42 -0500, Bill Rowe <readnews at>  

> On 6/5/09 at 3:04 AM, bastraat at (Bas Straatman) wrote:
>> Apparently there is more to it than meets the eye, but section 2.5.5
>> in the (old) mathematica book discusses the use of indexed objects.
> In the fourth edition of the Mathematica Book, it is section
> 2.4.5 titled Making Definitions for Indexed Objects *briefly*
> discusses using the syntax y[[0] etc as a "subscripted"
> variable. Basically, this section shows an example where it is
> more convenient to use this syntax over a list and has the
> following statement:
> You can think of the expression a[i] as being like an "indexed"
> or "subscripted" variable.
> None of what I've said really contradicts this. What I've done
> is simply point out "being like" is not the same as "being".
> That is, there are similarities between a subscripted variable
> and the syntax a[i] but there is not an identity relationship.

DrMajorBob at

  • Prev by Date: Re: interfacing odd usb device to mathematica
  • Next by Date: Re: MergeSort with replacerepeated
  • Previous by thread: Re: RandomReal gets stuck
  • Next by thread: Re: RandomReal gets stuck