MathGroup Archive 1999

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

Search the Archive

Re: Help Defining Variables (with long names)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16798] Re: [mg16720] Help Defining Variables (with long names)
  • From: Martin Kraus <mkraus at theorie3.physik.uni-erlangen.de>
  • Date: Tue, 30 Mar 1999 02:35:08 -0500
  • Organization: Regionales Rechenzentrum Erlangen, Germany
  • References: <7dbngm$c45@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Nik Semchenok wrote:
> Hello!
> 
> _ or Blank[ ] is a pattern object that can stand for any Mathematica expression.
> It is the protected character in Mathematica.
> 
> You can use, for example, tilde
> 
> liquid~density~of~ethylene~glycol=1.114
> 1.114
> 4*liquid~density~of~ethylene~glycol
> 4.456
> 
> Nik

NO! Do not do this!!! :)

~ is needed to use functions in the place of operators, for example

a ~And~ b 

is the same as

And[a,b]

which is the same as

a && b

which is more readable for C programmers, while a ~And~ b is
more readable for human beings. ;)

Therefore, liquid~density~of~ethylene~glycol is not a single
variable, but a tricky expression. We can see as long it is not
defined:

In[1]:= liquid~density~of~ethylene~glycol

Out[1]:= ethylene[density[liquid, of], glycol]

The recommended variable name is in this case
liquidDensityOfEthyleneGlycol.

Greetings 

Martin Kraus


  • Prev by Date: Re: system of differential couple equations...how?
  • Next by Date: Re: Atan[(tan(x)^2+tan(y)^2)^0.5] - Numeric approximation
  • Previous by thread: Re: Help Defining Variables (with long names)
  • Next by thread: Re: Help Defining Variables (with long names)