Skip to Content
0
Former Member
Mar 19, 2004 at 09:01 PM

why do casts from char to packed fields fail?

38 Views

hello there,

i try to assign a quite small value ('-9.123E-123') from a character(255) field into a field type p. but although the string is a number i get a CX_SY_CONVERSION_NO_NUMBER exception. only if i move the value into a float field first the typeconversion works.

data: var1(255) type c value '-9.123E-123',

var2 type f,

var3(7) type p decimals 2.

var3 = var1. => CX_SY_CONVERSION_NO_NUMBER

var3 = var2 = var1. => works fine

Does anybody know why the types aren't converted correctly and were i can get some additional documentation? the character field is also used for other not number like values and i do not want to use a lot of RTTI to determine the type of the field i assign the value to in my program.

thanks in advance

roman