title: How to specify only some optional arguments when calling function in ColdFusion?
body: <p>I have a ColdFusion function "foo" which takes three args, and the second two are optional:</p>
  
  <pre><code>&lt;cffunction name="foo" access="public" returntype="any"&gt;
      &lt;cfargument name="arg1" type="any" required="true" /&gt;
      &lt;cfargument name="arg2" type="any" required="false" default="arg2" /&gt;
      &lt;cfargument name="arg3" type="any" required="false" default="arg3" /&gt;
  
      ...
  
      &lt;cfreturn whatever /&gt;
  &lt;/cffunction&gt;
  </code></pre>
  
  <p>I want to call foo, passing in arg1 and arg3, but <strong><em>leaving out arg2</em></strong>.  I know that this is possible if I call the function using <strong><code>cfinvoke</code></strong>, but that syntax is really verbose and complicated.  I have tried these two approaches, neither works:</p>
  
  <pre><code>&lt;cfset somevar=foo(1, arg3=3) /&gt; &lt;!--- gives syntax error ---&gt;
  &lt;cfset somevar=foo(1, arg3:3) /&gt; &lt;!--- gives syntax error ---&gt;
  </code></pre>