10-09-2007 1:45 PM
Hello,
I have to variables (The first of the type char80 and the other char20).
Now I want to assign the value of the variable (char20) to the variable (char80).
I always get the error message, that the types are not compatible.
Is it possible to cast from char20 to char80?
Best regards & thanks in advance
Alberto
10-09-2007 1:48 PM
hi Alberto,
how are the variables defined? If they are :
var20 TYPE CHAR20
and
var80 TYPE CHAR80
than var80 = var20 should work without problems.
probably you can copy your code here
ec
10-09-2007 1:49 PM
Hi,
You can use the Type casting here, but why don;t you write like this
Move CAHR1 to CHAR2+0(20).
Regards
Sudheer
10-09-2007 1:51 PM
data : a type char20, b type char80.
a = 'Vasu'.
b = a.
write 😕 b.
It is not showing any error.....please check ur code....
Regards
vasu
10-09-2007 1:51 PM
Hi Alberto,
if what Eric not wok, u can try "Write to":
try it:
<b>write <char20> to <char80>.</b>
Regards
Allan Cristian
10-09-2007 1:53 PM
10-09-2007 2:32 PM
hi Eric,
ya it's work, but we don't know him code...
it's working perfectly, I said only another way to do it...
excuse me anything;
was not mine intention to offend,
Really, I'm sorry...
10-09-2007 1:59 PM
Hi Alberto,
you wrote "assign".
So you'd like to assign field symbols like this?
field-symbols: <f1> type char20,
<f2> type char80.
assign <f2> to <f1> casting.
Then you need to use the keyword casting to cast the types.
Best regards
Sven