Useless ColdFusion Function?

  • Post author:
  • Post category:Uncategorized

I’ve always wondered why the CF developers felt the need to create the function IncrementValue. It does what it sounds like, adds 1 to a variable. However, it is actually less code to do it the manual way:The only place I can see this being useful is if you ever needed to increment a value on the fly:#IncrementValue(ctr)#but I can’t think of a case where you’d want to do that. Sure, you don’t have to increment the variable first before outputting to screen, but you also lose the new value (after the increment). If anybody knows of cases where IncrementValue is useful, let me know. It makes me dream of other languages like Perl where you can just do ctr++.