Next: , Previous:   [Contents][Index]


1.3 Strings

Literal strings must be enclosed in double quotes (") or dollar signs ($). With eukleides, enclosing characters yield no difference but with euktopst dollar signs are taken as part of the string. Literal strings may be split in several lines.

Special characters

%n

Newline (LF).

%r

Return (CR).

%t

Tab.

%"

Double quote (when enclosing character).

%$

Dollar sign (when enclosing character).

%%

Percent sign.

String related functions

length(s)

Length of string s.

sub(s, i, j)

Substring of string s from index i to j. Indices start at 0.

cat(list)

Concatenates list into a single string, where list is a comma separated sequence of strings, numbers, points or sets. Numbers are formatted using at most 6 digits, with no trailing zeros or decimal point (i.e. the %g format for printf in C). Points are converted to their Cartesian coordinates. With eukleides abscissa and ordinate are simply separated by a white space. With euktopst coordinates are formated in the usual mathematical way, using parenthesis and comma.