[thelist] RE: What is the ColdFusion equivalent to eval()? (FROM RAY CAMDEN)

jon steele jjsteele22 at yahoo.com
Tue Apr 24 10:31:33 CDT 2001


You have two ways that you can set a dynamic var:

1) Use quotes: 
<CFSET NAME="ray">
<CFSET "Hoo#Name#" = 1>

will create a bar called HooRay.

2) Use the SetVariable() function. See docs.

Ray Camden
.sigless today

-----Original Message-----
From: jon steele

Thanks Lindsay,

But I'm still having some trouble. I am trying to use
my counter (i) in the name of the variables I am
declaring, creating a list variables like myvar1,
myvar2, etc. But I can't do this becuase CF tells me I
can't use Evaluate on the left hand-side. Is there
another way? This is what I was testing with:

<cfset mayvar1="Hi">
<cfset mayvar1="Hey">
<cfset mayvar1="Hello">

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/




More information about the thelist mailing list