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.

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

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

The $FICHAR Function<br />

result=$FICHAR(s)<br />

Returns: Numeric<br />

This function returns the ASCII numeric representation of the character s. Only the first character<br />

of s is used by this function.<br />

The $FINDEX Function<br />

result=$FINDEX(s1,s2)<br />

Returns: Numeric<br />

This function returns the starting position of the string s2 within the string s1. If s2 is not contained<br />

in s1, the function will return 0.<br />

The $FLEN Function<br />

result=$FLEN(a)<br />

Returns: Numeric<br />

This function returns the length of the input string or sequence a. Note that the length may be<br />

zero if a is an empty string ('') or an empty sequence.<br />

The $FMATCH Function<br />

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

Returns: String<br />

This function searches for an occurrence of the search string s2 in string s1. If found, the<br />

matched portion of string s1 is returned, or if string s3 is specified, string s3 will be returned. The<br />

default action is to locate the first matching occurrence of s2 in s1. This can be changed by<br />

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

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

empty string.<br />

The search string s2 can contain special characters in the form of a regular expression (RE)<br />

commonly found in UNIX search functions. See the $FEDIT function for a description of RE‟s.<br />

The substitution string s3 in the $FMATCH function can reference matched text saved in numbered<br />

buffers using the \( and \) sequence. For example,<br />

%L01=$FMATCH($P1,'N\([0-9][0-9]*\)','\1').<br />

This returns only the numeric portion of the matched text. If the third argument was omitted, the<br />

entire matched text would be returned.<br />

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

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

Saved successfully!

Ooh no, something went wrong!