Why must cfexecute be closed?

Simple question - but does anyone know why CFEXECUTE tags must be closed? In other words, you can't do this:

<cfexecute name="parispic" variable="result">

You must either do this:

<cfexecute name="parispic" variable="result" />


<cfexecute name="parispic" variable="result"></cfexecute>

The docs say you that you should not put anything between the closing and end tags, but this is perfectly valid:

<cfexecute name="parispic" variable="result"> <cfset x = 1> </cfexecute>

But if you try to use X, you get an error. It's almost as if the ColdFusion developers imagined some other tag that would work on the inside - but then changed their mind.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com