Navigation:  MCL Reference > Conversion Functions >

Conv( )

Print this Topic Previous pageReturn to chapter overviewNext page

The Conv( ) function converts a value to another value according to a lookup table. A lookup table is consisted of 2 columns. The first column is a Key Value column in which a set of original values is stored. The second column is the returned value column in which the values being converted to are stored. A simple lookup table "FPconv" is shown below:

 

KeyVal

RetVal

1

10

2

5

3

4

 

According to the table, 1 will be converted to 10 and 2 will be converted to 5, and so on. A default returned value could be specified if the value to be converted is not found in the KeyVal column. If no default returned value is specified, .NULL. will be returned.

 

Syntax

Conv(cLookupTableKeyVal, DefaultValue)

 

Returns

The data type of the returned value will be identical to that of the RetVal column.

 

Example

Conv("FPconv",HrFP( ),0)

The above function converts the finishing position according to the conversion table "FPconv".

 

 


Page url: http://www.racematenet.com/english/help/index.html?conv.htm