4.1. Introduction

Programming constructs can be used within CCL for advanced usage. Rather than invent a new language, CCL takes advantage of the full range of capabilities and resources from an existing programming language, Perl. Perl statements can be embedded between lines of simple syntax, providing capabilities such as loops, logic, and much, much more with any CCL input file.

A line of Power Syntax is identified in a CCL file by an exclamation mark (!) in the first column of a line. In between Perl lines, simple syntax lines may refer to Perl variables and lists. Examples of CCL with Power Syntax can be found in Examples of Power Syntax.

A wide range of additional functionality is made available to expert users with the use of Power Syntax including:

  • Loops

  • Logic and control structures

  • Lists and arrays

  • Subroutines with argument handling (useful for defining commonly re-used plots and procedures)

  • Basic I/O and input processing

  • System functions

  • much, much more (Object programming, WorldWide Web access, simple embedded GUIs).

Any of the above may be included in a CCL input file or Ansys TurboGrid Session file.


Important:  You should be wary when entering certain expressions, since Power Syntax uses Perl mathematical operators. For example, in CEL, is represented as 2^2, but in Perl, would be written 2**2. If you are unsure about the validity of an operator, you should check a Perl reference guide.


There are many good reference books on Perl. Two examples are "Learning Perl" (ISBN 1-56592-042-2) and "Programming Perl" (ISBN 1-56592-149-6) from the O’Reilly series.