I have been fooling around with some dynamic image method execution when something I already knew suddenly occurred to me in a different way - ColdFusion image manipulation functions return "Nothing". And, I don't mean that they simply don't return the resultant image object - I mean, just as the documentation states, they return "Nothing" - void. When I realized this, I started to look at all the other ColdFusion methods that don't echo back their primary argument and I realized that it is very hard to find other methods that return Nothing. All of the array and struct methods return true or false depending on success of execution; all the query manipulation methods return properties based on the actions; all other functions return actual values.
Are ColdFusion image manipulation functions the only built-in methods that return no value? And, if so, I wonder why these functions do this?
Looking For A New Job?
- Software Development Engineer - REQ20003869 at Express Scripts
- Mobile Application Developer at Xorbia Tickets
- 7 Year + Lead ColdFusion Developer at Atprime Media Services
- Full Time ColdFusion Developer Needed at InterCoastal Net Designs
Hmmmm ... you may be right, Ben. Never thought about it, but even the functions I normally use as if they returned nothing, do actually return Boolean. Like the query functions, which I normally don't even assign to anything:
<cfset querySetCell(myQry, "myCol", myVal)>
They can just as well be used as:
<cfset rowTest = queryAddRow(myQry)>
<cfset colTest = querySetCell(myQry, "myCol", myVal)>
<cfthrow message="Could not add a row to '#myQry#' for some reason">
Yeah, when I realized this, I would like, Oh let me go check out things like QueryAddRow() cause those have no return value... but then, it turns out they did.