26.12.2012 Views

ICAM Virtual Machine V19 - Kxcad.net

ICAM Virtual Machine V19 - Kxcad.net

ICAM Virtual Machine V19 - Kxcad.net

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.4.5.9 Character and Sequence Functions<br />

$FCHAR Conversion to character<br />

$FEDIT Edit string<br />

$FELEM Element of sequence<br />

$FFIND Index of a value in an array or sequence<br />

$FICHAR Conversion from character<br />

$FINDEX Index of a substring<br />

$FLEN Length of string or sequence<br />

$FMATCH Match string<br />

$FSEQ Create a sequence<br />

$FSUBSQ Extract subsequence<br />

$FSUBST Extract substring<br />

$FSWRIT String formatting<br />

$FTOLOWR String conversion to lower case<br />

$FTOUPER String conversion to upper case<br />

<strong>Virtual</strong> <strong>Machine</strong> Reference, Model Customization<br />

Simulation Macro Functions, Character and Sequence Functions<br />

Character functions deal with arguments of type STRING. Sequence functions deal with arguments<br />

matched using the $Pn* construct. In both cases, these arguments have a concept of<br />

length. The length of a string is the number of characters it contains. The length of a sequence is<br />

the number of elements (any combination of numbers, strings and keywords) it contains.<br />

The $FCHAR Function<br />

result=$FCHAR(n)<br />

Returns: String<br />

This function returns the ASCII character corresponding to the nearest whole value of n.<br />

The $FEDIT Function<br />

result=$FEDIT(s1,s2[,s3][,n])<br />

Returns: String<br />

This function searches for one or more occurrences of the search string s2 in string s1. For each<br />

occurrence, the matching portion is substituted by the contents of string s3, or if s3 is not specified,<br />

the matching portion is deleted. The default action is to replace all matching occurrences of<br />

s2 in s1 by s3. This can be changed by specifying n. If n is zero, then all matching occurrences<br />

are replaced (the default). If n is one (1), only the first match is replaced. Larger values of n<br />

cause the specified match number to be changed. If a match is not found, $FEDIT returns the<br />

string s1 unchanged.<br />

<strong>ICAM</strong> Technologies Corporation – Proprietary 169

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!