Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

Re: Howto turn off using symbols to tag objects?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46618] Re: [mg46593] Howto turn off using symbols to tag objects?
  • From: Tomas Garza <tgarza01 at prodigy.net.mx>
  • Date: Wed, 25 Feb 2004 13:07:10 -0500 (EST)
  • References: <200402250204.VAA09955@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Perhaps k has been assigned a numerical value prior to your expression. For
example,

In[1]:=
k = 1; NumberQ[ToExpression["123k"]]
Out[1]=
True

This is the result to be expected. But now look at

In[2]:=
Clear[k]; NumberQ[ToExpression["123k"]]
Out[2]=
False

If k is a number, i.e., it has been already assigned a numerical value, then
123k is evaluated first and returns a numerical value, namely 123 times k.

Tomas Garza
Mexico City
----- Original Message ----- 
From: "mvyver" <mvdv at spamcop.net>
To: mathgroup at smc.vnet.net
Subject: [mg46618] [mg46593] Howto turn off using symbols to tag objects?


> Hi, Does anyone know how to turn this feature off?
> The section in the documentation "Using symbols to tag objects" is
> silent.
> My problem is that when trying to remove alphabet characters from a
> string I'm told that "123k" is a number!!
>
> NumberQ[ToExpression["123k"]]
> True
>
> Using ToExpression with different forms doesn't help.
> Any suggestions would be appreciated.
> Thanks in advance
>
> Mark
>
>



  • Prev by Date: Matrix Element Extraction
  • Next by Date: Re: How to set y always greater than or equal to x for a function?
  • Previous by thread: Howto turn off using symbols to tag objects?
  • Next by thread: Re: Howto turn off using symbols to tag objects?