Hello -
Some programming languages have a way of concatenating multiple lines of code,
such as the _ in VBScript. Is there anything like this in ColdFusion?
Here's an example:
cfset variables.blah = queryname.columname1
queryname.columname2
May be I don't catch it, but this will work perfectly in CF:
cfset variables.blah = queryname.columname1
queryname.columname2
queryname.columname3
You need no delimiter to tell CF it s only one statement.
, March 23, 2009 1:30 PM
To: cf-talk
Subject: Re: Concatenate Multiple Lines of Code
May be I don't catch it, but this will work perfectly in CF:
cfset variables.blah = queryname.columname1
queryname.columname2
That will work as-is. Specifically, CF will string-concat
queryname.columname1, queryname.columname2, and queryname.columname3 and
stick the resulting string into variables.blah. Is that what you were
looking to do?
On Mon, Mar 23, 2009 at 12:16 PM, Hunsaker, Michael Scott
Hunsaker, Michael Scott wrote:
I can make it work but I would have a long line of code! Any ideas how to
get around this?
The way of concatenting multiple lines of code in CFML is just to write
them that way. White space is unimportant in CFML, one of the things it
inherits from its
If you're trying to use line feeds to space out your code, there is no
actual character for that in ColdFusion. However, CF is smart enough to keep
reading until the closing tag, so this
cfset foo = bar
somethingelse /
Is as valid as
cfset foo = bar somethingelse /
Francois Levesque
6 matches
Mail list logo