Skip to main content
nikos101
Inspiring
June 28, 2011
Answered

Invalid CFML construct when using cf8

  • June 28, 2011
  • 2 replies
  • 819 views

how come this only works in cf9:

allOrders = XmlSearch(xmlFeed, "ROOT/Batch");
13 :      var final = arrayNew(1);
14 :           for( var i = 1 ; i <= arraylen(allOrders); i = i + 1)
15 :           {

Invalid CFML construct found on line 14 at column 17.

    This topic has been closed for replies.
    Correct answer Adam Cameron.

    Because all VAR statements need to be @ the top of the method in CF8.

    --

    Adam

    2 replies

    Adam Cameron.Correct answer
    Inspiring
    June 28, 2011

    Because all VAR statements need to be @ the top of the method in CF8.

    --

    Adam

    Inspiring
    June 28, 2011

    Reading through this stuff might be of use in answering these sorts of questions for yourself:

    What’s new in ColdFusion 9

    http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSf01dbd23413dda0e-70d18ba71212f29e7cb-8000.html

    --

    Adam

    Message was edited by: Adam Cameron.

    Owainnorth
    Inspiring
    June 28, 2011

    Because that syntax only came out in CF9?