previous contents index next
(..Expressions..) Contents Index (..Expressions..)

2.10.2 String Expressions (StringExpression)

StringExpression - Syntax:

Syntax: StringExpression

Compared with integer expressions the structure of string expressions (strings) is easier. The reason for this is very simple: there exists only one operator that converts two strings into a new string, namely the concatenation operator + , which simply attaches one string to another.

The basic modules of StringExpression are

All these objects have already been discussed in this chapter. Note that - like IntReg - not all elements of StringReg are available in RDL.
 

Besides the general scopy function there exists a second, special way to get to substrings:

StringExpression [ i ]

returns the i-th character of StringExpression, where i is of IntExpression, 0 < i < len(StringExpression) - 1. (As usual we start counting from 0.)


Example 29:

Suppose language to be a variable of type STRING with contents "Retina Definition Language".
language[0] + language[7] + language[18] leadsto "RDL"

previous contents index next
(..Expressions..) Contents Index (..Expressions..)