Previous Topic Next topic Print topic


COBCH1624 Cannot implicitly convert type1 to type2.

A SET statement cannot be completed, because you cannot convert to or from the specified type.

For example:

class-id myClass1.

method-id myFirstMethod static.

 01 myFloat float-long.
 01 myString string.
 01 myInt binary-long.
 01 myObject object.
 01 myDecimal decimal.

 set myFloat to myString   *> this is incorrect
 set myFloat to myInt      *> this is correct
 set myObject to myString  *> this is correct - string derives from object
 set myDecimal to myString *> this is correct - In the .NET framwork, the System.Decimal class has an implicit conversion operator 
                                                from type int (binary-long) to type System.Decimal

end method.

end class.
Previous Topic Next topic Print topic