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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

Simulation Macro Functions, Conversion Functions<br />

4.4.5.7 Conversion Functions<br />

$FATOF Conversion string to real<br />

$FCVINT Conversion to whole number<br />

$FCVREAL Conversion to number<br />

$FMAJOR Conversion to major word (record)<br />

$FMINOR Conversion to minor word<br />

Conversion functions take arguments of one type and return arguments of a different type. String<br />

conversion functions are listed in the section following this one.<br />

The $FATOF Function<br />

result=$FATOF(s)<br />

Returns: Numeric<br />

This function converts a string s to a number. This can be useful, for example, when you wish to<br />

convert text in a NC block to a number that can be used in calculations.<br />

The $FCVINT Function<br />

result=$FCVINT(a)<br />

Returns: Numeric<br />

This function converts arguments of type LOGICAL, KEYWORD and REAL to a whole number.<br />

Logical arguments return a value of zero if $FALSE and a value of one if $TRUE. Minor<br />

words return a value equivalent to the integer code. Numeric variables are evaluated the same as<br />

with the $FINT function (i.e., the value is truncated to a whole number).<br />

The $FCVREAL Function<br />

result=$FCVREAL(a)<br />

Returns: Numeric<br />

This function converts arguments of type LOGICAL, KEYWORD and REAL to a number.<br />

Logical arguments return a value of zero if $FALSE and a value of one if $TRUE. Minor words<br />

return a value equivalent to the integer code. Numeric variables are returned as-is.<br />

The $FMAJOR Function<br />

result=$FMAJOR(class,subclass)<br />

Returns: Record<br />

This first form of the $FMAJOR function rounds the class and subclass numeric arguments to<br />

the nearest whole number and returns an argument of type RECORD. The “class subclass”<br />

combination need not exist as a known major word or record type.<br />

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

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

Saved successfully!

Ooh no, something went wrong!