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>Virtual</strong> <strong>Machine</strong> Reference, Model Customization<br />

Simulation Macro Functions, Other Functions<br />

The following example gets the value of the “interface_kit” DEF file symbol:<br />

%L01=$FGETDEF('campost.interface_kit')<br />

The $FGETENV Function<br />

result=$FGETENV(s)<br />

Returns: String or $NULL<br />

This function returns the value of a (potentially case sensitive) environment variable identified<br />

by the string s. $NULL is returned if the environment variable has not been defined or if some<br />

other error occurs while attempting to obtain the variable definition.<br />

The $FPAUSE Function<br />

result=$FPAUSE([string])<br />

Returns: Logical<br />

This function will pause GENER or CERUN processing and display a message-box with the<br />

specified or default string. The user will be given a choice to either pause or continue processing.<br />

When paused, the full GENER or CERUN interface is made active. Once processing resumes, this<br />

function will return a logical value of $TRUE if the user chose to pause processing, or $FALSE<br />

otherwise.<br />

The message-box will not be displayed when running in background mode. In this case, the<br />

$FPAUSE function immediately returns a value of $FALSE and processing continues uninterrupted.<br />

The $FSORT Function<br />

The $FSORT function can be used to sort the contents of a file or the contents of a sequence<br />

variable.<br />

result=$FSORT(infile,outfile [,delimiters] [,field,type,order [,…]])<br />

Returns: Numeric<br />

When sorting a file, the contents of the input file are first read into memory, sorted, and then<br />

written to the output file. The same file name can be specified for both input and output files.<br />

Sorting occurs on specific fields (or columns) of data in the file. By default, a run of spaces<br />

defines the boundary from one field to the next. Specify an optional delimiters string to define a<br />

different character or set of characters to be used as field separators (e.g., specify $FCHAR(10)<br />

to use a tab character as a delimiter). The default increasing ASCII text order of sorting can be<br />

changed by specifying a “field,type,order” sort key parameter, where field identifies a field<br />

number, type is a string 'N' or 'S' defining a numeric or string field type, and order is one of the<br />

keywords INCR or DECR. Additional sort keys can be specified to further sort records with<br />

matching sort key fields. If all sort keys are the same, then the original record order is maintained<br />

(i.e., a “stable” sort). The $FSORT function will return the number of records in the output file,<br />

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

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

Saved successfully!

Ooh no, something went wrong!