Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

subscripted variables and comments

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24375] subscripted variables and comments
  • From: David Chapman <d.a.chapman at open.ac.uk>
  • Date: Wed, 12 Jul 2000 23:13:15 -0400 (EDT)
  • Organization: The Open University
  • Sender: owner-wri-mathgroup at wolfram.com

This may be too vague for anyone to help, but any ideas would be
gratefully received. 

I'm using lots of subscripted variables which I have set up with
Symbolize (Mathematica v4). I use them in long
functions in Packages created from Notebooks with the 'Auto Save
Package' facility, and the function
definitions contain comments (* ... *). 

I get things working OK, then do a minor edit and find that when I load
the package (<< blah.m) into a
notebook I get  messages indicating that it has got confused by  the
subscripted variable, eg: 

Syntax::bktwrn: 
   "elect(2 B\_laser-B\_elect)" represents multiplication; use 
    "elect[2 B\_laser-B\_elect]" to represent a function. 

(The first elect in this was the subscript of  B\_elect) If I open the
Notebook that I used to create the Package
and run the function from there I don't get the message and the function
can be used fine. Sometimes the
solution seems to be to remove any spaces on either side of the
comments, but on other occasions I've not
found any spaces and I've resorted to deleting all my comments from the
function definition - which is a pity
since my programs are confusing enough even with the comments present! 

David 
-- 
David Chapman, Lecturer in Electronics
The Open University, 
Walton Hall, 
Milton Keynes MK7 6AA
UK

T. +44 1908 652919. Fax +44 1908 653658
http://www-tec.open.ac.uk/tel/people/chapman/david/


  • Prev by Date: strange Integrate result
  • Next by Date: HELP!! 3D --> 2D math problems..
  • Previous by thread: Re: strange Integrate result
  • Next by thread: Re: subscripted variables and comments