### 13.1.3. Simple Syntax Details

The following applies to any line that is not a Power Syntax or action line (that is, the line does not start with a `!` or `>)`.

#### 13.1.3.1. Case Sensitivity

Everything in the file is sensitive to case.

Case sensitivity is not ideal for typing in many long parameter names, but it is essential for bringing the CFX Expression Language (CEL) into CCL. This is because some names used to define CCL objects (such as `Fluids`, `Materials` and `Additional Variables`) are used to construct corresponding CEL names.

For simplicity and consistency, the following is implemented:

- Singletons and object types use upper case only.

- Parameter names, and predefined object names, are mixed case. The CFX Expression Language tries to follow the following conventions:

  1. Major words start with an upper case letter, while minor words such as prepositions and conjunctions are left in lower case (for example, `Mass Flow in`).

  2. Case is preserved for familiar names (for variables `k` or `r`), or for abbreviation `RNG`.

- User object names conventions can be chosen arbitrarily by you.

#### 13.1.3.2. CCL Names Definition

Names of singletons, types of object, names of objects, and names of parameters all follow the same rules:

- In simple syntax, a CCL name must be at least one character. This first character must be alphabetic; there may be any number of subsequent characters and these can be alphabetic, numeric, space or tab.

- The effects of spaces in CCL names are:

  - Spaces appearing before or after a name are not considered to be part of the name.

  - Single spaces appearing inside a name are significant.

  - Multiple spaces and tabs appearing inside a name are treated as a single space.

#### 13.1.3.3. Indentation

Nothing in the file is sensitive to indentation, but indentation can be used for easier reading.

#### 13.1.3.4. End of Line Comment Character

The `#` character is used for this. Any text to the right of this character will be treated as comments. Any characters may be used within comments.

#### 13.1.3.5. Continuation Character

If a line ends with the character `\`, the following line will be linked to the existing line. There is no restriction on the number of continuation lines.

#### 13.1.3.6. Named Objects

A named object consists of an object type at the start of a line, followed by a `:` and an object name. Subsequent lines may define parameters and child objects associated with this object. The object definition is terminated by the string `END` on a line by itself.

Object names must be unique within the given scope, and the name must not contain an underscore.

#### 13.1.3.7. Singleton Objects

A singleton object consists of an object type at the start of a line, followed by a `:`. Subsequent lines may define parameters and child objects associated with this object. The object definition is terminated by the string `END` on a line by itself.

The difference between a singleton object and a named object is that (after the data has been processed), a singleton can appear just once as the child of a parent object. However, there may be several instances of a named object of the same type defined with different names.

#### 13.1.3.8. Parameters

A parameter consists of a parameter name at the start of a line followed by an `=` character followed by a parameter value. A parameter may belong to many different object types. For example, `U Velocity = 1.0 [m/s]` may belong to an initial value object and `U Velocity = 2.0 [m/s]` may belong to a boundary condition object. Both refer to the same definition of U velocity in the rules file.

#### 13.1.3.9. Lists

Lists are used within the context of parameter values and are comma separated.

#### 13.1.3.10. Parameter Values

All parameter values are initially handled as data of type String, and should first of all conform to the following definition of allowed String values:

##### 13.1.3.10.1. String

- Any characters can be used in a parameter value.

- String values or other parameter type values are normally unquoted. If any quotes are present, they are considered part of the value. Leading and trailing spaces are ignored. Internal spaces in parameter values are preserved as given, although a given application is free to subsequently assume a space condensation rule when using the data.

- The characters `$` and `#` have a special meaning. A string beginning with `$` is evaluated as a Power Syntax variable, even if it occurs within a simple syntax statement. This is useful for performing more complex Power Syntax variable manipulation, and then using the result as part of a parameter or object definition. The appearance of `#` anywhere in the CCL file denotes the start of a comment.

- The characters such as `[`, `]`, `{`, and `}` are special only if used in conjunction with `$`. Following a `$`, such characters terminate the preceding Perl variable name.

- Other characters that might be special elsewhere in power syntax are escaped automatically when they appear in parameter values. For example, `@`, `%` and `&` are escaped automatically (that is, you do not need to precede these characters with the escape character `\` when using them in parameter values).

- Parameter values can contain commas, but if the string is processed as a List or part of a List then the commas may be interpreted as separators (see below under List data types).

Some examples of valid parameter values using special characters in power syntax are:

    Estimated cost = \$500
    Title = Run\#1
    Sys Command = "echo ’Starting up Stress solver’ ; fred.exe &"
    Pressure = $myArray[4]
    Option = $myHash{"foo"}
    Fuel = C${numberCatoms}H${numberHatoms}

Parameter values for data types other than String will additionally conform to one of the following definitions.

##### 13.1.3.10.2. String List

A list of string items separated by commas. Items in a String List should not contain a comma unless contained between parentheses. One exception can be made if the String List to be is interpreted as a Real List (see below). Otherwise, each item in the String List follows the same rules as String data.

`names = one, two, three, four`

##### 13.1.3.10.3. Integer

Sequence of digits containing no spaces or commas. If a real is specified when an integer is needed, the real is rounded to the nearest integer.

##### 13.1.3.10.4. Integer List

List of integers, separated by commas.

##### 13.1.3.10.5. Real

A single-precision real number that may be specified in integer, floating point, or scientific format, followed optionally by a dimension. Units use the same syntax as CEL.

Expressions are allowed to include commas inside function call argument lists.

Example usage:

    a = 12.24
    a = 1.224E01
    a = 12.24 [m s^-1]

A real may also be specified as an expression such as:

    a = myvel^2 + b
    a = max(b,2.0)

##### 13.1.3.10.6. Real List

List of reals, comma separated. Note that all items in the list must have the same dimensions. Items that are expressions may include commas inside function call argument lists, and the enclosed commas will be ignored when the list is parsed into individual items. Example usage:

    a = 1.0 [m/s], 2.0 [m/s], 3.0 [m/s], 2.0*myvel, 4.0 [cm/s]

The list syntax `5*2.0` to represent 5 entries of the value 2.0 is not supported within CCL and hence within CFD-Post.

##### 13.1.3.10.7. Logical

Several forms are acceptable: `YES`, `TRUE`, `1` or `ON` are all equivalent; `NO` or `FALSE` or `0` or `OFF` are all equivalent; initial letter variants `Y`, `T`, `N`, `F` are accepted (`O` is not accepted for `On`/`Off`); all case variants are accepted. Logical strings are also case insensitive (`YeS`, `nO`).

##### 13.1.3.10.8. Logical List

List of logicals, separated by commas.

#### 13.1.3.11. Escape Character

The `\` character to be used as an escape character, for example, to allow `$` or `#` to be used in strings.

Release 18.2 - © ANSYS, Inc. All rights reserved.