Ask a Question related to Macromedia ColdFusion, Design and Development.
-
JakeFlynn #1
Nested delimiters (#)
I created a bunch of vars using a loop and named them: X#LoopCount# so you
end up with X1, X2, X3... all as variables. Now I want to use a loop to go back
through and access each value:
<cfloop index="LoopCount" from="1" to="#max#">
<cfoutput>#X#LoopCount##</cfoutput>
</cfloop>
This obviously does not work. Does anyone know of a work around? Thank you for
your time.
Jake
JakeFlynn Guest
-
Using PDPageStmGetToken - is it possible toget \r and space delimiters?
Hi, I was able to correctly read my stream tokens via PDPageStmGetToken, but I could see that I could get only tokens themself and not space or... -
Nested controls
"Dan Caron" <spam1@caronit.com> wrote in message news:01b101c369ac$ee21a6a0$a101280a@phx.gbl... In which event do you check on Page.IsPostBack?... -
Single versus Double quote marks as string delimiters
Hi All, I have heard other people say that PHP can parse double quoted strings (e.g., "Hello, World") faster than it can parse single quoted... -
Parsing a PHP String without Delimiters
I'm trying to figure out how to parse the MySQL Date/Time group '20031001155704' into meaningful data (i.e. - year, month, day, hour, minute, and... -
extended ascii delimiters when when writing to outputstream
Whenever I write to Response.Outputstream after doing a plain response.write, I get a delimiter between the two writes that is made up of three... -
stpaz #2
Re: Nested delimiters (#)
You can either:
Evaluate the item e.g. #evaluate('X' & LoopCount)# which isn't really
recommended, as it has performance issues.
or
Scope the variable #variables['X' & LoopCount]# (this works for all most if
not all CF structures)
e.g
<cfset X23 = "hello">
<cfset LoopCount = 23>
<cfoutput>#variables['X' & LoopCount]#</cfoutput>
stpaz Guest
-
JakeFlynn #3
Re: Nested delimiters (#)
stpaz,
I had to use your first (evaluate) option because I was working with cookie vars. That did the trick, thanks!
JakeFlynn Guest
-
JakeFlynn #4
Re: Nested delimiters (#)
One last question how would you check if it is defined incrementally?
isdefined does not work with #evaluate('X' & LoopCount)#...
JakeFlynn Guest
-
Stressed_Simon #5
Re: Nested delimiters (#)
Don't use evaluate, just reaplace variables for cookie eg #cookie['X' & LoopCount]#
Stressed_Simon Guest
-
stpaz #6
Re: Nested delimiters (#)
One last question how would you check if it is defined incrementally?
isdefined does not work with #evaluate('X' & LoopCount)#...
try this:
isdefined("X#loopcount#")
stpaz Guest
-
JakeFlynn #7
Re: Nested delimiters (#)
try this:
isdefined("X#loopcount#")
That did the trick thanks again stpaz
JakeFlynn Guest



Reply With Quote

