how many bytes can a CF function be?
ColdFusion
Apparently, the answer is 65535 bytes.
I had a huge laugh today when we got this error...
"500 cfReports2ecfc1683660545$funcRUN (Code of a method longer than 65535 bytes) cfReports2ecfc1683660545$funcRUN (Code of a method longer than 65535 bytes)"
... when trying to run a function I had just refactored for some inherited code. It had the dreaded problem that none of the function-local variables were scoped. So, I dutifully added cfset Var local = StructNew() to the top of the function and spent about 4 hours prepending all relevant variables with "local."
then, we got this error and noticed the huge, complex function has 2189 lines of CF code. I'm guessing CF server was able to compile the code, but just isn't allowed to run a function larger than 65535 byte.
Has anyone else ever seen this? (i did a short Google session, but didn't turn up anything)
Yes, I know this function needs to be rewritten badly to shorter functions, yadda, yadda... but I couldn't help sharing.
I had a huge laugh today when we got this error...
"500 cfReports2ecfc1683660545$funcRUN (Code of a method longer than 65535 bytes) cfReports2ecfc1683660545$funcRUN (Code of a method longer than 65535 bytes)"
... when trying to run a function I had just refactored for some inherited code. It had the dreaded problem that none of the function-local variables were scoped. So, I dutifully added cfset Var local = StructNew() to the top of the function and spent about 4 hours prepending all relevant variables with "local."
then, we got this error and noticed the huge, complex function has 2189 lines of CF code. I'm guessing CF server was able to compile the code, but just isn't allowed to run a function larger than 65535 byte.
Has anyone else ever seen this? (i did a short Google session, but didn't turn up anything)
Yes, I know this function needs to be rewritten badly to shorter functions, yadda, yadda... but I couldn't help sharing.





Loading....