webCOMAND

#CSCRIPT

Syntax

#CSCRIPT ... #ENDCSCRIPT

Description

Evaluate a block containing cScript code.  In other words, switch from "inline cScript", which is best for template-style scripting where variables and statements are mixed in with output (statements start with # and are in all uppercase), to "regular cScript", which is best for larger blocks of code where echo is required for output and statements don't start with #, are in lowercase and end with a semi-colon.

Related

#EVAL, #PERL, #PHP

Example

#CSCRIPT
    // embedded regular cScript inside inline-cscript
    $contacts = cql('FROM Contacts ORDER BY LastName');
    list($contacts) {
        echo($FirstName + ' ' + $LastName + '\n');
    }
#ENDCSCRIPT